build_schema_htdocs.py: pylint fixes

Change-Id: Ibf9c55cd2d23610ef24f7de70e01a4a00f630fc1
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Testsuite: re-arrange virt setup

Move the setup of interfaces with port groups after switches have been
polled.

Change-Id: I13f6662dae7a944707dbe3a0d750723a0dc09c10
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Standardize variable name used for VlanInfo

There were a couple variants in use, let's pick dbvi.

Change-Id: Ic18868e4d07458687d76f2ef8e928d5e3b24d965
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Store MAC addresses as integers in the DB

This allows doing simple calculations like "what is the next MAC
address?" to be done at the database side. Due to force_mac() already
being used to validate the input, all commands dealing with MAC
addresses will now receive a MACAddress() object instead of a string
automatically.

Change-Id: I1f8904dcd4596c6a95ec061129ed4a57c7f81749
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Speed up --automac

Avoid loading all existing MAC addresses, instead let the DB calculate
the first hole.

Change-Id: Ib58e5af8eb022b8470abcf7f0622ab5e4e742611
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Fix refresh_windows tests

When the testsuite is set to use a database other than SQLite, the
broker does not create the directory where we want to store machines.db,
so we need to do that ourselves.

Change-Id: I54b3371845f5333fd62bb0502ac4e21dbd6351ff
Order observed MACs in the formatter only

The in-model ordering is no longer useful, because the formatter already
re-orders the result. So drop the sorting from the model, and add
sorting by MAC to the formatter.

Change-Id: I6564b42c08260e524f9b87b9a4b14a73434023c6
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Convert MetaClusterMember to a many-to-many relation

Drop the MapperExtension, and perform validation explicitely when
needed.

Change-Id: Ib06a485c7dde2bc69ea67404caa170c091998a42
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Drop the VM-to-host ratio

It's no longer needed. add_esx_cluster still accepts the option, but it
has no effect.

Addresses-Issue: Jira/AQUILON-2023
Change-Id: I541f8930dfa500a244d28f7a145d93e7d97cfde6
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Don't allow deleting members of a cluster

Change-Id: I48cc1e881c633cd87fa738111205f24307eb2b9a
Addresses-Issue: Jira/AQUILONAQD-219
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Generate CHECK constraints for MAC columns

Change-Id: Id2319e480e4468a0d8b48270078147284c664d19
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Move tool locations to a separate config section

Also let run_command() automagically perform the translation, so its
callers become simpler.

Change-Id: Icdd20d8cfecb0a23cf2f89516031d7ea511f01e7
Reviewed-By: Priya Joshi <Priya.Joshi@morganstanley.com>
Add helper for calculating the default DNS domain

Change-Id: Id45c3975a3a6fd43f949d046baf4db7b031e5ad8
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
add_dynamic_range: Make --dns_domain optional

If --dns_domain is not specified, use the default DNS domain configured
for the location of the network.

Change-Id: I4a4ae55cb6d8bff771c105d2e2907432780fed23
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Add helper for updating common location attributes

update_city was missing --fullname, add that as well.

Change-Id: I236349423281a775102917c432e10e87a3c27f6f
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Fix refresh_windows tests

When the testsuite is set to use a database other than SQLite, the
broker does not create the directory where we want to store machines.db,
so we need to do that ourselves.

Change-Id: I54b3371845f5333fd62bb0502ac4e21dbd6351ff
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Bump external sqlite version

Change-Id: Ib8bca10ae60dd21dadb008054dd78adedb912305
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Drop Branch.hosts and Branch.clusters

Nothing uses these relations, and cascading rules cause extra queries to
be emitted if they are present (e.g. when a branch is deleted).

Change-Id: I81b5e117d48bb415eb129acf7f0bcef633c9c298
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Deploy: do not require justification when called with --dryrun

Change-Id: I9383f9ff5818123fafd62c98ea0c5a895a753b7a
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>
Clean up AQDB dependencies

IPython and argparse are not used by AQDB, so move those from
aquilon.aqdb.depends into the scripts that need them.

Change-Id: I771f338389909e834124f85c018623728ce3d98f
Reviewed-By: Dave Reeve <Dave.Reeve@morganstanley.com>