Commit 454d8044 authored by Vegard Vesterheim's avatar Vegard Vesterheim
Browse files

Added doc of nettinst2room

Also: Markdown -> Org formatting
parent 4a14b9bf
Synchronization of equipment from Kind to NAV
=============================================
usage: kindnavsync [-h] [--dry-run] [--kind-only] [--debug]
[--api-url API_URL] [--api-token API_TOKEN]
[--no-timestamps]
Synchronizes devices in NAV with those from Kind
optional arguments:
-h, --help show this help message and exit
--dry-run, -n don't change anything in NAV, just print what would
have been done
--kind-only only check contents of Kind, do not talk to NAV
--debug, -d enable debug logging
--api-url API_URL, -a API_URL
URL to the NAV API. Default=http://localhost/api/1
--api-token API_TOKEN, -t API_TOKEN
NAV API Token
--no-timestamps Don't add timestamps to log output
Since Kind only stores names of devices, while NAV requires specific IP
addresses, up-to-date DNS entries are required. If the environment variable
SLACK_URL is set, this program will post log messages to Slack using this as a
webhook URL.
Supported environment variables
-------------------------------
- `NAV_API_URL`: URL to NAV API
- `NAV_API_TOKEN`: NAV API token, providing at least read/write access for the
`/netbox` and `/room` endpoints.
- `SLACK_URL`: If set, log output will be posted to this slack webhook URL. See
<https://api.slack.com/incoming-webhooks> for details.
Notes
-----
- This program will not touch NAV devices owned by the organizational units
`urc` or `privat`.
- All devices will be set as owned by the organizational unit `uninett`.
- _"Nettinstallasjon"_ will be used as the device room in NAV.
- Any new room that this program creates in NAV will have its location set to
`norge`.
Bugs
----
- Doesn't update IP addresses in NAV if DNS changes.
* Synchronization of data from Kind to NAV
:PROPERTIES:
:CUSTOM_ID: synchronization-of-equipment-from-kind-to-nav
:END:
** Synchronization of equipment from Kind to NAV
#+BEGIN_EXAMPLE
usage: kindnavsync [-h] [--dry-run] [--kind-only] [--debug]
[--api-url API_URL] [--api-token API_TOKEN]
[--no-timestamps]
Synchronizes devices in NAV with those from Kind
optional arguments:
-h, --help show this help message and exit
--dry-run, -n don't change anything in NAV, just print what would
have been done
--kind-only only check contents of Kind, do not talk to NAV
--debug, -d enable debug logging
--api-url API_URL, -a API_URL
URL to the NAV API. Default=http://localhost/api/1
--api-token API_TOKEN, -t API_TOKEN
NAV API Token
--no-timestamps Don't add timestamps to log output
Since Kind only stores names of devices, while NAV requires specific IP
addresses, up-to-date DNS entries are required. If the environment variable
SLACK_URL is set, this program will post log messages to Slack using this as a
webhook URL.
#+END_EXAMPLE
** Supported environment variables
:PROPERTIES:
:CUSTOM_ID: supported-environment-variables
:END:
- =NAV_API_URL=: URL to NAV API
- =NAV_API_TOKEN=: NAV API token, providing at least read/write access
for the =/netbox= and =/room= endpoints.
- =SLACK_URL=: If set, log output will be posted to this slack webhook
URL. See [[https://api.slack.com/incoming-webhooks]] for details.
** Notes
:PROPERTIES:
:CUSTOM_ID: notes
:END:
- This program will not touch NAV devices owned by the organizational
units =urc= or =privat=.
- All devices will be set as owned by the organizational unit =uninett=.
- /"Nettinstallasjon"/ will be used as the device room in NAV.
- Any new room that this program creates in NAV will have its location
set to =norge=.
** Bugs
:PROPERTIES:
:CUSTOM_ID: bugs
:END:
- Doesn't update IP addresses in NAV if DNS changes.
** Synchronization of rooms from KIND to NAV
usage: nettinst2room [--debug]
[--api-url API_URL] [--api-token API_TOKEN]
[--room <roomname>]
Syncs room data from KIND to NAV. Takes an optional argument ~--room~
if only a specific room is to be synced. Default operation is to sync
all rooms returned by the API at https://kind.uninett.no/api/nettinstallasjoner.json
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment