Permalink
Browse files

Add hostname attribute

  • Loading branch information...
nicolasferry committed Feb 6, 2016
1 parent ae0fd60 commit b8f437ecea0c9b41638c0b5bed56ce61f9fbca93
@@ -132,6 +132,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="provided" upperBound="-1"
eType="#//core/VMPortInstance" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="publicAddress" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="hostname" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VMPortInstance" eSuperTypes="#//core/CloudMLElementWithProperties">
@@ -428,6 +428,7 @@ public void vmInstanceToPOJO(net.cloudml.core.VMInstance kVmInstance) {
assert vms.containsKey(kVM.getType().getName());
VMInstance ni = new VMInstance(kVM.getName(), vms.get(kVM.getType().getName()));
ni.setPublicAddress(kVM.getPublicAddress());
ni.setHostname(kVM.getHostname());
convertProperties(kVM, ni);
initProvidedExecutionPlatformInstances(kVmInstance, ni);
@@ -501,6 +501,7 @@ public void externalComponentInstanceToKmf(List<ExternalComponentInstance<? exte
net.cloudml.core.VMInstance kni = factory.createVMInstance();
kni.setName(ni.getName());
kni.setPublicAddress(ni.getPublicAddress());
kni.setHostname(ni.getHostname());
kni.setId(ni.getId());
kni.setType(vms.get(ni.getType().getName()));
if(ni.getStatus() != null)
@@ -359,6 +359,7 @@ public void updateVMMetadata(VMInstance a){
runtimeInformation.put("publicAddress", nodeInstance.getPublicAddresses().iterator().next());
//a.setPublicAddress(nodeInstance.getPublicAddresses().iterator().next());
a.setId(nodeInstance.getId());
a.setHostname(nodeInstance.getHostname());
a.setCore((int) nodeInstance.getHardware().getProcessors().iterator().next().getCores());
state = ComponentInstance.State.RUNNING;

0 comments on commit b8f437e

Please sign in to comment.