Link catalog item to a catalog in Mock
Add Mock for a vAppTemplate

This just returns a single record, which is the intention of a look-up by vAppTemplate name and Catalog name. The fields are correct, but the values are bogus. We are very specific about how it is called because that is what we require for our test – this could be extended to deal with other complex queries.
Add a Mock for post_instantiate_vapp_template

Sets the status of the vApp to "created".

Adds a VM to the vApp, with memory and networks.
Do not return a network from sample config

This is just sample config, it doesn't deal with realistic configurations. For the test we are currently writing we need to return configuration without a network, which is valid configuration so, since this mock needs work anyway, we are removing the sample config for a network.
Add Mock for put_memory
Add Mock for put_vm
Add Mock for put_cpu
Add Mock for get_vapp_metadata

It's the same API method for vApps and VMs, so need to check both IDs.

This only returns a piece of custom metadata, not the system metadata that is also returned.

This commit also adds metadata to be retrived by this method from the Mock data.
Add Mock for put metadata
Add Mock for get_vms_in_lease_from_query

The only option implemented here is a filter by href as that is all we need for our tests. It can easily be extended as required.
Merge pull request #3044 from alphagov/add-mocks

[vcloud_director] Mocks for a number of vApp operations