private static void configNvpExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
/**
* Extra Config : nvp.vm-uuid = uuid
* - Required for Nicira NVP integration
*/
OptionValue newVal = new OptionValue();
newVal.setKey("nvp.vm-uuid");
newVal.setValue(vmSpec.getUuid());
extraOptions.add(newVal);
/**
* Extra Config : nvp.iface-id.<num> = uuid
* - Required for Nicira NVP integration
*/
int nicNum = 0;
for (NicTO nicTo : sortNicsByDeviceId(vmSpec.getNics())) {
if (nicTo.getUuid() != null) {
newVal = new OptionValue();
newVal.setKey("nvp.iface-id." + nicNum);
newVal.setValue(nicTo.getUuid());
extraOptions.add(newVal);
}
nicNum++;
}
}