4445
|
|
[r=allenap][bug=][author=mpontillo] Networking constraints refactoring (part 1). * Add fabrics, not_fabrics, fabric_classes, and not_fabric_classes constraints. * Covers nodes only, not with the ability to relate back to interfaces yet. * Fabric name handling only works for user-specified names currently, and must be fixed in a follow-on commit. * Rename methods in NodeQueriesMixin to better match Django conventions. * Refactor Subnets to use a new SubnetQueriesMixin class. * Refactor common query mixin logic to a common superclass. * Rename get_subnets_with_ip() to raw_subnets_containing_ip() to make it more clear that it returns a raw query. * Add specifier-based Subnet queries (now used for networking constraint matching). * Remove legacy subnet specifier handling code * Disable legacy subnet specifier tests dealing with multiple constraint matching (this logic will be moved to the interfaces= constraint, since it is specific to individual interfaces) * Remove legacy 'networks' form fields * Add backward-compatibility handling to use 'subnets' for these fields (we may want to remove this completely, since it behaves slightly differently) * No validators have been implemented yet for fabric and fabric class constraints; again, this will happen in a follow-on commit. * Add 'space' specifier to subnet constraints. * Add 'cidr' specifier to subnet constraints. * Change default behavior of subnet constraints to first match on CIDR, then try matching on name if no match is found. * Remove Fabric matching from custom query, since subnet CIDRs are "globally" unique. (within MAAS) * Move generic hex/decimal integer parsing code into its own utility function. * Add PyCharm inspection profiles for Node and Subnet query mixins.
|
Mike Pontillo |
8 years ago
|
|
|