4486
|
|
|
Mike Pontillo |
8 years ago
|
|
|
4485
|
|
|
Mike Pontillo |
8 years ago
|
|
|
4484
|
|
|
Lee Trager |
8 years ago
|
|
|
4483
|
|
|
Blake Rouse |
8 years ago
|
|
|
4482
|
|
[r=blake-rouse,lamont][bug=1510917][author=mpontillo] Use specifier-based queries in the API to look up networking objects.
* The following objects can now be queried by specifier within the API: * Fabric * Interface * Space * Subnet * VLAN * Network (uses Subnet specifier) * API URLs for VLANS have been changed. * Previous: /fabrics/<fabric>/vlans/<vlan.id> * New: /vlans/<vlan_id> *AND* /fabrics/<fabric>/vlans/<vid> * VLAN IDs for new MAAS installations or upgrades will now start at 5001, so they cannot be confused with VIDs. (with the exception of the default VLAN, which remains at id=0.) * String-based specifiers separated by commas will now be treated as multiple filters. (and will be combined in the query with a logical AND operator.) * The InterfaceLinkForm has been updated to allow a query specifier in place of a Subnet model object. * Interface objects can now be queried by vlan, hostname, or fabric. * The default query for Interface objects is now more robust. (first checks interface ID, then IP address (with or without CIDR, but if the CIDR is provided, it must match an attached subnet), then name. * The subnet_id URL regex has been updated so that the '/' character can be used when specifying a subnet CIDR. * orm.py:get_one() has been updated to determine the model class dynamically (for better error messages) and allow specifying a custom exception class. * orm.py:get_model_object_name(queryset) helper function added * Functionality to format specifier parameters has been moved to its own function. * An equivalent for get_object_or_404() has been implemented in the queries mixin, as get_object_by_specifiers_or_raise(). * A generic function to parse name-or-ID strings like "space-12" has been added to the queries mixin. * A default query function to call the name-or-ID parser, then look for an object name (or ID) has been added to the queries mixin.
|
Mike Pontillo |
8 years ago
|
|
|
4481
|
|
|
Blake Rouse |
8 years ago
|
|
|
4480
|
|
|
Blake Rouse |
8 years ago
|
|
|
4479
|
|
|
Gavin Panella |
8 years ago
|
|
|
4478
|
|
|
Jeffrey C Jones |
8 years ago
|
|
|
4477
|
|
|
Andres Rodriguez |
8 years ago
|
|
|
4476
|
|
|
Lee Trager |
8 years ago
|
|
|
4475
|
|
|
Blake Rouse |
8 years ago
|
|
|
4474
|
|
|
ricgard |
8 years ago
|
|
|
4473
|
|
|
Gavin Panella |
8 years ago
|
|
|
4472
|
|
|
Lee Trager |
8 years ago
|
|
|
4471
|
|
|
Blake Rouse |
8 years ago
|
|
|
4470
|
|
|
ricgard |
8 years ago
|
|
|
4469
|
|
|
Blake Rouse |
8 years ago
|
|
|
4468
|
|
|
ricgard |
8 years ago
|
|
|
4467
|
|
|
Blake Rouse |
8 years ago
|
|
|