ncm-opennebula: add support for OpenNebula

There are too many levels of indentation through this function, making it difficult to follow. Please try to simplify its flow...