Skip to content

How to Share Collections from NOC Web Interface

NOC is the open-source product, so every contribution is valuable for us. Collections is an important part of NOC, so we provide an easy way to share your collection models with the community.

Consider you have got a self-made collection, for example a new model of switch or connection rule or etc. Follow the steps:

  1. Register at our Gitlab
  2. Create a Personal Access Token with api scope checked. Remember it!
  3. Open a model, that you want to share in NOC web interface, for example: JSON
  4. Use the Force, Luke, and fill up all the forms. JSON2 API Key Description
  5. Then NOC will send file (your browser should have access to the Internet) to the repository and opens a Merge Request. Some browsers will prevent open a new popup, so check this moment. MR
  6. Congratulations with your contribution and thank you.

Changing or Restoring API Token

In case if you forgot your token or you want to change it:

$ ./noc shell
from noc.core.mongo.connection import connect
from noc.main.models.apitoken import APIToken
from import User
user = User.objects.get(username="YOUR_NOC_LOGIN")
token = APIToken.objects.filter(type="noc-gitlab-api",
token.token = "NEW_TOKEN"