Exemplo n.º 1
0
 public static void tryAssignSystemAddress(final VmInstance vm) {
   if (!EucalyptusProperties.disableNetworking) {
     try {
       Address newAddress = AddressUtil.allocateAddresses(vm.getPlacement(), 1).get(0);
       newAddress.setInstanceId(vm.getInstanceId());
       newAddress.setInstanceAddress(vm.getNetworkConfig().getIpAddress());
       AddressUtil.dispatchAssignAddress(newAddress, vm);
     } catch (NotEnoughResourcesAvailable notEnoughResourcesAvailable) {
       LOG.error(
           "Attempt to assign a system address for "
               + vm.getInstanceId()
               + " failed due to lack of addresses.");
     } catch (Exception e) {
       LOG.error(
           "Attempt to assign a system address for "
               + vm.getInstanceId()
               + " failed due to lack of addresses.");
     }
   }
 }
Exemplo n.º 2
0
 public static void dispatchAssignAddress(String addr, VmInstance vm) {
   Address address = Addresses.getInstance().lookup(addr);
   AddressUtil.dispatchAssignAddress(address, vm);
 }
Exemplo n.º 3
0
 public static void assignAddressToVm(Address address, VmInstance vm)
     throws EucalyptusCloudException {
   AddressUtil.markAddressAssigned(address, vm);
   AddressUtil.dispatchAssignAddress(address, vm);
 }