From d1ab91cdf081d2d5b4c255bf229f5aa4a5ca10ff Mon Sep 17 00:00:00 2001 From: Marc Lebreuil Date: Sat, 4 May 2024 16:07:43 +0000 Subject: [PATCH] Deployed a7fbdf9 with MkDocs version: 1.5.3 --- index.html | 21 ++++++++++++--------- search/search_index.json | 2 +- sitemap.xml.gz | Bin 242 -> 242 bytes 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 1a55b24..edf288c 100644 --- a/index.html +++ b/index.html @@ -68,7 +68,7 @@
- + Skip to content @@ -263,13 +263,13 @@
(venv) $ cd /opt/netbox/netbox/
 (venv) $ python3 manage.py migrate
 
+ diff --git a/search/search_index.json b/search/search_index.json index d4bffbf..344abc3 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":""},{"location":"#netbox-contract-documentation","title":"Netbox-contract documentation","text":""},{"location":"#overview","title":"Overview","text":"

The pluggin adds contracts and invoices model to Netbox. It allows to register contract with objects. Add invoices to contracts.

"},{"location":"#installation","title":"Installation","text":""},{"location":"#activate-venv","title":"Activate venv","text":"

To ensure our plugin is accessible to the NetBox installation, we first need to activate the Python virtual environment that was created when we installed NetBox. To do this, determine the virtual environment's path (this will be /opt/netbox/venv/ if you use the documentation's defaults) and activate it:

$ source /opt/netbox/venv/bin/activate\n
"},{"location":"#install-the-package","title":"Install the package","text":"
$ python3 -m pip install netbox-contract\n
"},{"location":"#configure-netbox","title":"Configure NetBox","text":"

Finally, we need to configure NetBox to enable our new plugin. Over in the NetBox installation path, open netbox/netbox/configuration.py and look for the PLUGINS parameter; this should be an empty list. (If it's not yet defined, go ahead and create it.) Add the name of our plugin to this list:

# configuration.py\nPLUGINS = [\n    'netbox_contract',\n]\n
"},{"location":"#customize-the-plugin","title":"Customize the plugin","text":"

The following configurationitems can be set:

# configuration.py\nPLUGINS_CONFIG = {\n    'netbox_contract': {\n        'top_level_menu': True,\n        'default_accounting_dimensions':{\n            \"account\": \"\", \n            \"project\": \"\", \n            \"cost center\": \"\"\n        },\n        'mandatory_contract_fields': ['accounting_dimensions'],\n        'hidden_contract_fields': [],\n        'mandatory_invoice_fields': ['accounting_dimensions'],\n        'hidden_invoice_fields': [],\n    }\n}\n
"},{"location":"#customize-the-plugin-fields-choices","title":"Customize the plugin fields choices","text":"

Internal partie reference the legal entity of your organization that is a partie to the contract.

# configuration.py\nFIELD_CHOICES = {\n    'netbox_contract.Contract.internal_partie': (\n        ('Nagravision SARL', 'Nagravision SARL', 'green'),\n        ('Nagra USA', 'Nagra USA', 'green'),\n        ('Nagra India', 'Nagra India', 'green'),\n    ),\n    'netbox_contract.Contract.currency': (\n        ('usd', 'USD'),\n        ('eur', 'EUR'),\n        ('chf', 'CHF'),\n        ('pln', 'PLN'),\n    ),\n    'netbox_contract.Contract.status': (\n        ('Active', 'Active', 'green'),\n        ('Cancled', 'Canceled', 'red'),\n    )\n}\n
"},{"location":"#run-database-migrations","title":"Run database migrations","text":"
(venv) $ cd /opt/netbox/netbox/\n(venv) $ python3 manage.py migrate\n
"},{"location":"changelog/","title":"Changelog","text":""},{"location":"changelog/#changelog","title":"Changelog","text":""},{"location":"changelog/#unreleased","title":"[Unreleased]","text":""},{"location":"changelog/#version-21","title":"Version 2.1","text":""},{"location":"changelog/#version-210","title":"Version 2.1.0","text":""},{"location":"changelog/#version-2","title":"Version 2","text":""},{"location":"changelog/#version-2014","title":"Version 2.0.14","text":""},{"location":"changelog/#version-2013","title":"Version 2.0.13","text":""},{"location":"changelog/#version-2011","title":"Version 2.0.11","text":""},{"location":"changelog/#version-2010","title":"Version 2.0.10","text":""},{"location":"changelog/#version-209","title":"Version 2.0.9","text":""},{"location":"changelog/#version-208","title":"Version 2.0.8","text":""},{"location":"changelog/#version-207","title":"Version 2.0.7","text":""},{"location":"changelog/#version-206","title":"Version 2.0.6","text":""},{"location":"changelog/#version-205","title":"Version 2.0.5","text":""},{"location":"changelog/#version-204","title":"Version 2.0.4","text":""},{"location":"changelog/#version-203","title":"Version 2.0.3","text":""},{"location":"changelog/#version-202","title":"Version 2.0.2","text":"

Add support for Netbox 3.5 which become the minimum version supported to accomodate the removal of NetBoxModelCSVForm class (replaced by NetBoxModelImportForm) .

"},{"location":"changelog/#version-201","title":"Version 2.0.1","text":"

Add support contract assignement panel to devices.

"},{"location":"changelog/#version-200","title":"Version 2.0.0","text":"

Add a new contract asignement model to allow the assignement of contract not only to Circuits. The support for the direct Contract to Circuit relation will be removed in version 2.1.0 . In Order to migrate existing relations contract_migration.py script is provided and can be run from the django shell.

"},{"location":"contributing/","title":"Contributing","text":""},{"location":"contributing/#contributing","title":"Contributing","text":"

Contributions are welcome!

"},{"location":"contributing/#types-of-contributions","title":"Types of contributions","text":""},{"location":"contributing/#report-bugs-or-submit-feedback","title":"Report bugs or submit feedback","text":"

Report bugs and submit feetback here.

"},{"location":"contributing/#fix-bugs","title":"Fix bugs","text":"

Look through the GitHub issues for bugs. Anything tagged with \"bug\" and \"help wanted\" is open to whoever wants to implement it.

"},{"location":"contributing/#implement-features","title":"Implement features","text":"

Look through the GitHub issues for features. Anything tagged with \"enhancement\" and \"help wanted\" is open to whoever wants to implement it.

"},{"location":"contributing/#coding-conventions","title":"Coding conventions","text":"

Netbox Style Guide Django Coding style

For this: All files will be formated using the black auto-formatter. Configuration is stored in pyproject.toml

isort is used to automate import sorting.

Linting and PEP8 style enforcement will be done with Flake8 which is a wrapper arround: - PyFlakes - pycodestyle - Ned Batchelder\u2019s McCabe script Configuration is maintained in the .flake8 file (no support for pyproject.toml)

The pre-commit Python framework is used to simplify the managment of pre-commit hooks. Config is stored in .pre-commit-config.yaml

"},{"location":"contributing/#repository-structure","title":"Repository structure","text":"

There are 2 permanent branch in the repository:

For each new feature or bug fix a branch is created from the corresponding issue.

"},{"location":"contributing/#setup-your-development-environment","title":"Setup your development environment","text":"

python -m pip install pre-commit\npre-commit install\n
1. Install Netbox. Make sure taht at the Netbox installtion step you follow the \"Option B: Clone the Git Repository\"

  1. From the Netbox directory you activate the NetBox virtual environment

    $ cd netbox\n$ source venv/netbox/bin/activate\n
  2. Fork the netbox-contract repo on GitHub.

  3. Clone your fork locally

    $ cd ..\n$ git clone git@github.com:your_name_here/netbox-contract.git\n
  4. Add the plugin to NetBox virtual environment:

    $ python3 -m pip install -e netbox-contract\n
  5. Update the Netbox configuration ans run the database migrations as mentionned in the plugin installation steps.

  6. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature\n

    Make your changes locally.

  7. You can test your changes using the django development server:

    $ python3 netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure\n

    Connect to the name or IP of the server (as defined in ALLOWED_HOSTS) on port 8000; for example, http://127.0.0.1:8000/.

  8. Commit your changes and push your branch to GitHub:

    $ git add .\n$ git commit -m \"Your detailed description of your changes.\"\n$ git push origin name-of-your-bugfix-or-feature\n
  9. Submit a pull request through the GitHub website.

"},{"location":"contributing/#pull-request-guidelines","title":"Pull Request Guidelines","text":"

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated.
  3. The pull request should work for Python 3.8, 3.9, 3.10 and 3.11. Check Actions and make sure that the tests pass for all supported Python versions.
"},{"location":"contributing/#deploying","title":"Deploying","text":"

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in CHANGELOG.md) and that all tests pass. Then in the github project go to Releases and create a new release with a new tag. This will automatically upload the release to pypi:

"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":""},{"location":"#contract-pluggin","title":"Contract pluggin","text":""},{"location":"#overview","title":"Overview","text":"

The pluggin adds contracts and invoices model to Netbox. It allows to register contract with objects. Add invoices to contracts.

Check the documentation for additional information

"},{"location":"#installation","title":"Installation","text":""},{"location":"#activate-venv","title":"Activate venv","text":"

To ensure our plugin is accessible to the NetBox installation, we first need to activate the Python virtual environment that was created when we installed NetBox. To do this, determine the virtual environment's path (this will be /opt/netbox/venv/ if you use the documentation's defaults) and activate it:

$ source /opt/netbox/venv/bin/activate\n
"},{"location":"#install-the-package","title":"Install the package","text":"
$ python3 -m pip install netbox-contract\n
"},{"location":"#configure-netbox","title":"Configure NetBox","text":"

Finally, we need to configure NetBox to enable our new plugin. Over in the NetBox installation path, open netbox/netbox/configuration.py and look for the PLUGINS parameter; this should be an empty list. (If it's not yet defined, go ahead and create it.) Add the name of our plugin to this list:

# configuration.py\nPLUGINS = [\n    'netbox_contract',\n]\n
"},{"location":"#customize-the-plugin","title":"Customize the plugin","text":"

The following configurationitems can be set:

# configuration.py\nPLUGINS_CONFIG = {\n    'netbox_contract': {\n        'top_level_menu': True,\n        'default_accounting_dimensions':{\n            \"account\": \"\", \n            \"project\": \"\", \n            \"cost center\": \"\"\n        },\n        'mandatory_contract_fields': ['accounting_dimensions'],\n        'hidden_contract_fields': [],\n        'mandatory_invoice_fields': ['accounting_dimensions'],\n        'hidden_invoice_fields': [],\n    }\n}\n
"},{"location":"#customize-the-plugin-fields-choices","title":"Customize the plugin fields choices","text":"

Internal partie reference the legal entity of your organization that is a partie to the contract.

# configuration.py\nFIELD_CHOICES = {\n    'netbox_contract.Contract.internal_partie': (\n        ('Nagravision SARL', 'Nagravision SARL', 'green'),\n        ('Nagra USA', 'Nagra USA', 'green'),\n        ('Nagra India', 'Nagra India', 'green'),\n    ),\n    'netbox_contract.Contract.currency': (\n        ('usd', 'USD'),\n        ('eur', 'EUR'),\n        ('chf', 'CHF'),\n        ('pln', 'PLN'),\n    ),\n    'netbox_contract.Contract.status': (\n        ('Active', 'Active', 'green'),\n        ('Cancled', 'Canceled', 'red'),\n    )\n}\n
"},{"location":"#run-database-migrations","title":"Run database migrations","text":"
(venv) $ cd /opt/netbox/netbox/\n(venv) $ python3 manage.py migrate\n
"},{"location":"changelog/","title":"Changelog","text":""},{"location":"changelog/#changelog","title":"Changelog","text":""},{"location":"changelog/#unreleased","title":"[Unreleased]","text":""},{"location":"changelog/#version-21","title":"Version 2.1","text":""},{"location":"changelog/#version-210","title":"Version 2.1.0","text":""},{"location":"changelog/#version-2","title":"Version 2","text":""},{"location":"changelog/#version-2014","title":"Version 2.0.14","text":""},{"location":"changelog/#version-2013","title":"Version 2.0.13","text":""},{"location":"changelog/#version-2011","title":"Version 2.0.11","text":""},{"location":"changelog/#version-2010","title":"Version 2.0.10","text":""},{"location":"changelog/#version-209","title":"Version 2.0.9","text":""},{"location":"changelog/#version-208","title":"Version 2.0.8","text":""},{"location":"changelog/#version-207","title":"Version 2.0.7","text":""},{"location":"changelog/#version-206","title":"Version 2.0.6","text":""},{"location":"changelog/#version-205","title":"Version 2.0.5","text":""},{"location":"changelog/#version-204","title":"Version 2.0.4","text":""},{"location":"changelog/#version-203","title":"Version 2.0.3","text":""},{"location":"changelog/#version-202","title":"Version 2.0.2","text":"

Add support for Netbox 3.5 which become the minimum version supported to accomodate the removal of NetBoxModelCSVForm class (replaced by NetBoxModelImportForm) .

"},{"location":"changelog/#version-201","title":"Version 2.0.1","text":"

Add support contract assignement panel to devices.

"},{"location":"changelog/#version-200","title":"Version 2.0.0","text":"

Add a new contract asignement model to allow the assignement of contract not only to Circuits. The support for the direct Contract to Circuit relation will be removed in version 2.1.0 . In Order to migrate existing relations contract_migration.py script is provided and can be run from the django shell.

"},{"location":"contributing/","title":"Contributing","text":""},{"location":"contributing/#contributing","title":"Contributing","text":"

Contributions are welcome!

"},{"location":"contributing/#types-of-contributions","title":"Types of contributions","text":""},{"location":"contributing/#report-bugs-or-submit-feedback","title":"Report bugs or submit feedback","text":"

Report bugs and submit feetback here.

"},{"location":"contributing/#fix-bugs","title":"Fix bugs","text":"

Look through the GitHub issues for bugs. Anything tagged with \"bug\" and \"help wanted\" is open to whoever wants to implement it.

"},{"location":"contributing/#implement-features","title":"Implement features","text":"

Look through the GitHub issues for features. Anything tagged with \"enhancement\" and \"help wanted\" is open to whoever wants to implement it.

"},{"location":"contributing/#coding-conventions","title":"Coding conventions","text":"

Netbox Style Guide Django Coding style

For this: All files will be formated using the black auto-formatter. Configuration is stored in pyproject.toml

isort is used to automate import sorting.

Linting and PEP8 style enforcement will be done with Flake8 which is a wrapper arround: - PyFlakes - pycodestyle - Ned Batchelder\u2019s McCabe script Configuration is maintained in the .flake8 file (no support for pyproject.toml)

The pre-commit Python framework is used to simplify the managment of pre-commit hooks. Config is stored in .pre-commit-config.yaml

"},{"location":"contributing/#repository-structure","title":"Repository structure","text":"

There are 2 permanent branch in the repository:

For each new feature or bug fix a branch is created from the corresponding issue.

"},{"location":"contributing/#setup-your-development-environment","title":"Setup your development environment","text":"

python -m pip install pre-commit\npre-commit install\n
1. Install Netbox. Make sure taht at the Netbox installtion step you follow the \"Option B: Clone the Git Repository\"

  1. From the Netbox directory you activate the NetBox virtual environment

    $ cd netbox\n$ source venv/netbox/bin/activate\n
  2. Fork the netbox-contract repo on GitHub.

  3. Clone your fork locally

    $ cd ..\n$ git clone git@github.com:your_name_here/netbox-contract.git\n
  4. Add the plugin to NetBox virtual environment:

    $ python3 -m pip install -e netbox-contract\n
  5. Update the Netbox configuration ans run the database migrations as mentionned in the plugin installation steps.

  6. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature\n

    Make your changes locally.

  7. You can test your changes using the django development server:

    $ python3 netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure\n

    Connect to the name or IP of the server (as defined in ALLOWED_HOSTS) on port 8000; for example, http://127.0.0.1:8000/.

  8. Commit your changes and push your branch to GitHub:

    $ git add .\n$ git commit -m \"Your detailed description of your changes.\"\n$ git push origin name-of-your-bugfix-or-feature\n
  9. Submit a pull request through the GitHub website.

"},{"location":"contributing/#pull-request-guidelines","title":"Pull Request Guidelines","text":"

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated.
  3. The pull request should work for Python 3.8, 3.9, 3.10 and 3.11. Check Actions and make sure that the tests pass for all supported Python versions.
"},{"location":"contributing/#deploying","title":"Deploying","text":"

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in CHANGELOG.md) and that all tests pass. Then in the github project go to Releases and create a new release with a new tag. This will automatically upload the release to pypi:

"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index e9ff54739ab0bac768443cc1818169d58ad21d09..cac26b56093ea3403c1b79ac68454195d69bb6e2 100644 GIT binary patch delta 14 Vcmeyw_=%BCzMF%?KXxM98vrDC1l9lm delta 14 Vcmeyw_=%BCzMF$XA!Z`m8vrAS1f~E0