Heya, I'm trying to get my head around something and would welcome some feedback.
The use case I'm currently working with is related to internal networks. I have serveral use cases that call for internal networks that have no connection to the outside world. Say I have a couple of webservers with one nic in a sourcenat-ted network and one nic in a dedicated DB network. And a couple of DB servers that are only located in the DB network. (A similar scenario is where the VMs exist in an already existing VLAN or bridged network using a Nicira Nvp Gateway) As admin I have created a networkoffering with just DHCP, DNS and UserData enabled and no other services. As a domain-admin I can create a network based on that offering via the API and give it an ip range that I want. When creating a VM in that network I get a message saying that I can allocate an address. If I create this network as a domain-admin the last step in createNetwork(CreateNetworkCmd) in NetworkManagerImpl, the call to createVlanAndPublicIpRange(), is skipped. This is OK as it is an internal network for domain. When creating the VM the GuestNetworkGuru (line 402) assumes that it should get an IP using the allocateDirectIp call. This goes wrong as there are no IP's in the "public" pool for this lan. I would like to change this piece in GuestNetworkGuru to check if the public range is in the public ip table and if it's not use the acquireGuestIpAddress call to reserve an IP. But as I'm not completely sure about the reasoning behind this I would like some feedback on my reasoning before I break stuff in other places :-) Cheers, Hugo