Drop search-like functinality from show_model

Change-Id: Ieaae931950290acb40ca3b6e3c0b5d35c8a49a8e
Reviewed-by: Zoltan Sebestyen <Zoltan.Sebestyen@morganstanley.com>
Fix netdev tests

Don't try to create the netinfra domain from the tests - use ut-prod
instead. Also drop some GRN tests that are superfluous.

Change-Id: I1b2811108bb765ffb7e1b2ec445fc9e12fdd5fba
Fix parse_protobuf

SRCDIR was removed some time ago, use lookup_file_path() instead to
locate aqd.conf.defaults.

Change-Id: Ie9446fb151df85c365dbb8850eba20d7b112a111
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: netdev test fixes

Drop a test that is now unneded, because the change it was supposed to
test was dropped some time ago.

Fix a comment about interface name propagation, that is no longer true.

Change-Id: Ia1dd3cbb2abb764078ea0921a6ada35aff7a7ea3
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: re-arrange test_{add,del}_host.py

In test_add_host.py, move real tests to the front, and move building
of infrastructure to be used later to the end of the file.

Change-Id: I979851faf2fff5d6578b4b677d2865216b61f210
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: re-arrange test_{add,del}_netdev.py

Change-Id: I491e8747cc24d555458645e91ff46529ae92f0c2
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: re-arrange test_update_netdev.py

Change-Id: Ib9cf67a5e98a646e08a6079705148bf391470814
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: netdev improvements #1

Rename a couple swithes to make it more obvious what are we testing.

Change-Id: Ie26ffa3898b41bf5446ef75bbd66370e5019455c
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: netdev improvements #2

Allocate a dynamic network to be used for switch management addresses
inside the ut building, and use it instead of static networks.

Change-Id: I01332c991cb00408d5e01c0666b7ad2af2217aa9
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: rename switches

Rename ut01ga2s03 to ut01ga2s05 and np01ga2s03 to np01ga2s05, to allow
re-using those names for other purposes.

Change-Id: Ibdc9ce484bb3af544095f9fc51de285862715a66
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: re-arrange test_{add,del}_dynamic_range.py

Change-Id: Iffcb28d6b02ee2bd36c086ce16b4fe8ba5978a7a
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Move the dynname function into TestBrokerCommand

Change-Id: I06642c832f54f5175add7bccc6772ceed052296f
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Testsuite: allocate dynamic DHCP networks dynamically

Stop using vmotion_net for dynamic DHCP tests, create network dyndhcp2
instead.

Change-Id: I4e7c3bbeef0aeaf4d7a80c5c6dde1a5026400e7f
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Clean up archetype references

When comparing or using the name of an archetype, use the DB object to
avoid normalization issues. Compute config section names in an uniform
way.

Change-Id: Iab2243a7894da3f325e6d35230e25af79cd8efbd
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Fix port group allocation

The previous pg allocation algorithm counted VMs on a per observed VLAN
basis. However, if the same network/VLAN was observed on multiple
switches, but only one of the switches is actually bound to an ESX
cluster, then the VM count for that observed VLAN will always be 0, so
the algorithm always preferred this VLAN thinking it's not used. That
broke the round-robin allocation of VLANs.

When checking which VLAN is the least used, we need to do that on a
per network basis, summing allocations registered to any other switches.

Addresses-Issue: Jira/AQUILON-684
Change-Id: I042e89441f44a1490ee37c768428653cedd5c617
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Add locking around "add machine --prefix"

"add host --prefix" uses the DNS domain as a lock anchor to prevent
concurrent allocations. There's no such anchor object available for "add
machine --prefix", so what we can do is to lock all the existing
machines matching the prefix.

Change-Id: I6408fc80b2e7f74a263cf10a0019342ad4d1f0b6
Reviewed-by: Priya Joshi <Priya.Joshi@morganstanley.com>
Restrict root access commands to secadmins

Change-Id: Ie1911f923e827e80e14adf4e53121f82112278e1
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Restrict deletion of netgroups

Currently the deletion of netgroup happens silently
with access being revoked automatically. This
should throw an error

Change-Id: I971989113fb60ee63194aa61dba8994d5f669e1c
Addresses-Issue: AQUILON-1914
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Make the docs more explanatory.

Change-Id: I473cd0f4c6aedc0c1e32bec7438a39721b608243
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Merge remote-tracking branch 'origin/for_next/root_auth_changes'