~kirkland/maas/1287224

  • Committer: Dustin Kirkland
  • Date: 2014-08-05 18:35:26 UTC
  • Revision ID: dustin.kirkland@gmail.com-20140805183526-5plse38fgu65eq2i
Enable MAAS to produce friendly, pronounceable hostnames, LP: #1287224

Ship two culled word lists -- 1,315 adjectives, and 977 nouns.  This gives
us a possible 1,284,755 combinations of adjective-noun, which is more than
enough to cover any Class B, /12 network (255.240.0.0) and its 1,048,576
unique IP addresses.

You might notice that this model is quite similar to Ubuntu's friendly
release naming scheme, such as "Warty Warthog".

These word lists are shipped and installed in /etc/maas/adjectives.txt
and /etc/maas/nouns.txt, such that they are easily customized, edited,
or overwritten by any MAAS administrator.

The modified code updates the generate_hostname() hostname function
to try and generate an 'adjective-noun' hostname, but if any exception
occurs (such as a wordlist read exception), it will fall back to the
legacy 5-random-non-ambiguous-character hostname.

A test is included to ensure that all randomly generated hostnames
fit the model of "word hyphen word".  However, note that it's probably
not able to open and read the word lists, since they're installed on disk.
Filename Latest Rev Last Changed Committer Comment Size
..
doc.txt 441.1.1 12 years ago Gavin Panella Add documentation template. 457 bytes Diff Download File
management_command.py 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 915 bytes Diff Download File
model.py 1875.1.3 10 years ago jtv at canonical Turns out we don't need to list models for registr 978 bytes Diff Download File
module.js 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 482 bytes Diff Download File
module.py 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 318 bytes Diff Download File
README 16.3.8 12 years ago Gavin Panella Explain the purpose of templates/. 145 bytes Diff Download File
File script.py 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 534 bytes Diff Download File
File script.sh 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 307 bytes Diff Download File
test_module.html 288.2.2 12 years ago Gavin Panella Change MaaS to MAAS everywhere. 1.1 KB Diff Download File
test_module.js 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 697 bytes Diff Download File
test_module.py 1811 10 years ago MaaS Lander [r=jtv][bug=][author=julian-edwards] Simple model 545 bytes Diff Download File