Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Blank pages are all children of the page "Unused HWDB pages" and have titles of the form "Unused HWDB page n" where n is a positive integer. To add more pages and get their URLs for the QR code stickers run blanks.py. It will prompt you for the number of new pages to create and a starting value for n. You should choose values so as to avoid generating the same titles as existing blank pages. blanks.py will print the URLs of the newly created pages. Save these so that sticker stickers may be printed for from them.

bash-3.2$ dat/hwdb/blanks.py
Starting number: 11
Number of new pages: 10
Confluence password:
New page URLS:
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088610
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088611
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088612
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088613
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088614
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088615
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088617
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088618
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088619
https://confluence.slac.stanford.edu/pages/viewpage.action?pageId=165088620

Getting a login token: hwdblogin.py

Some commands can't prompt for a Confluence password because they have to be non-interactive. For such commands you need to obtain a login token by running hwdblogin.py. It will prompt for a password, log in to Confluence and print the resulting token on stdout. You'll need to capture the token for later use.

bash-3.2$ token=$(hwdblogin.py)
Confluence password for tether:
bash-3.2$ echo $token
49eb5131ce


Allocating a MAC address: allocmac.py

The page "HWDB MAC address pool" shows which of the DAT group's MAC address have been allocated and which are still free. allocmac.py reads the page, allocates one MAC address, updates the page and prints the allocated address on stdout.

bash-3.2$ mac=$(allocmac.py --login $token)
bash-3.2$ echo $mac
08:00:56:00:43:38

Checking pages for validity: checkpage.py

This command prompts repeatedly for page identifiers. These may be URLs of the page ID form used for the QR code stickers or just the page IDs themselves. checkpage.py performs the following checks on each page:

  • The title is a valid serial number followed by a valid device class.
  • No other page in the hardware database has the same serial number.
  • The Type field is present and valid for the device class.