Unable to look up a node based on mac address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Raphaël Badin | ||
maas (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Quantal |
Fix Released
|
High
|
Unassigned |
Bug Description
the most common piece of information that uniquely (mostly uniquely) identifies a system is mac address.
If someone was going to perform updates to the systems in maas, they very likely would want to query by the mac address.
This was discussed in #maas along with the idea of using CNAME for human-friendly name and then on maas-devel under "Re: Strategy regarding DNS and static DHCP leases"
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: maas 0.1+bzr745+
ProcVersionSign
Uname: Linux 3.5.0-4-generic x86_64
ApportVersion: 2.3-0ubuntu4
Architecture: amd64
Date: Fri Jul 20 16:19:05 2012
PackageArchitec
ProcEnviron:
TERM=screen
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
RelatedPackageV
python-django-maas 0.1+bzr745+
apparmor 2.8.0-0ubuntu1
SourcePackage: maas
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
modified.
mtime.conffile.
mtime.conffile.
mtime.conffile.
mtime.conffile.
Related branches
- Gavin Panella (community): Approve
-
Diff: 83 lines (+40/-7)2 files modifiedsrc/maasserver/api.py (+26/-7)
src/maasserver/tests/test_api.py (+14/-0)
Changed in maas: | |
status: | Incomplete → Triaged |
Changed in maas (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in maas (Ubuntu Quantal): | |
status: | Triaged → Fix Released |
I see two possible solutions to that problem: (?P<system_ id_or_mac_ address> [\w\-]+ )/$'
a) we could add a "lookup" method to the API. The method would return a list of system IDs from a set of criteria (mac adress would be one of the possible criteria).
b) or, if we want to promote the mac address as an identifier, we could allow the mac to be used as an identifier when calling the API: e.g. the definition of the API url for a node handler would be: r'nodes/
Given the fact that the system id is auto-generated (and UUID-based) and that the mac address has a well defined format, there is no risk of conflict.