From 4f93e53ff72e731f8556c1beb8242dcd0766774d Mon Sep 17 00:00:00 2001 From: Marc Lebreuil Date: Sat, 4 May 2024 16:02:41 +0000 Subject: [PATCH] Deployed a7fbdf9 with MkDocs version: 1.5.3 --- changelog/index.html | 606 +++++++++++++++++++++++++++++++++++++++ contributing/index.html | 540 ++++++++++++++++++++++++++++++++++ search/search_index.json | 2 +- sitemap.xml | 10 + sitemap.xml.gz | Bin 219 -> 242 bytes 5 files changed, 1157 insertions(+), 1 deletion(-) create mode 100644 changelog/index.html create mode 100644 contributing/index.html diff --git a/changelog/index.html b/changelog/index.html new file mode 100644 index 0000000..4a354d2 --- /dev/null +++ b/changelog/index.html @@ -0,0 +1,606 @@ + + + + + + + + + + + + + + + + + + + + + Changelog - Netbox-contract NetBox Plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + + + +
+ +
+ + + + +
+
+ + + +
+
+
+ + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Changelog

+ + +

Changelog

+

[Unreleased]

+

Version 2.1

+

Version 2.1.0

+
    +
  • Setup the documentation on Github pages
  • +
  • Automate the creation of PiPY packages from releases with Github Actions
  • +
  • Automate the creation of the release notes from CHANGELOG.md
  • +
+

Version 2

+

Version 2.0.14

+
    +
  • 127 Fix contract filtering
  • +
  • Fix contact assignement.
  • +
+

Version 2.0.13

+
    +
  • 123 prepare plugin to Netbox 4.0 migration.
  • +
  • 125 Cleanup direct reference to Circuits in the Contract model. Correct database inconsistencies related to the ContractAssignment object renaming.
  • +
+

Version 2.0.11

+
    +
  • 115 API correction for contract external partie
  • +
  • 117 Tenant and accounting dimensions optional
  • +
  • 119 Add a Yearly recuring cost, read only, calculated field for contract
  • +
  • 15 Quick serach limited to active contracts
  • +
+

Version 2.0.10

+
    +
  • 107 Add the contacts tab to the service provider detail view.
  • +
  • 111 Correct assignment spelling.
  • +
+

Version 2.0.9

+
    +
  • 42 Allow the selection of either providers or Service providers as contract third partie.
  • +
  • Removed all reference to the direct assignement of circuits to contracts
  • +
  • 88 Add a placeholder value to the accounting dimensions jsonfield. This placeholder vale con be configured as part of the PLUGINS_CONFIG parameter in the configuration.py file (see above)
  • +
  • 89 add the posibility to link contracts to sites and virtual machines.
  • +
  • 99 list child contracts in on the parent view.
  • +
+

Version 2.0.8

+
    +
  • #91 Replace deprecated ( in netbox version 3.6) MultipleChoiceField.
  • +
  • 48 Allow other plugin to inject visual in contract and invoice forms.
  • +
  • [89] (https://github.com/mlebreuil/netbox-contract/issues/89) Add contract assignement to virtual machines.
  • +
+

Version 2.0.7

+
    +
  • #85 Fix missing fields contract and invoice import and export forms.
  • +
+

Version 2.0.6

+
    +
  • #80 Fix missing fields in the API.
  • +
+

Version 2.0.5

+
    +
  • #75 Fix contract assignement for service providers.
  • +
  • #73 Add comment field to contract import form
  • +
  • #72 Add fields to the contract assignement bottom tables
  • +
  • Remove the 'add' actions from the contract assignment list view
  • +
+

Version 2.0.4

+
    +
  • Add bulk update capability for contract assignement
  • +
  • #63 Correct an API issue on the invoice object.
  • +
  • #64 Add hierarchy to contract; New parent field created.
  • +
  • #65 Add end date to contact import form.
  • +
  • Removed the possibility of add or modify circuits to contracts. The field becomes read only and will be removed in next major release.
  • +
  • Make accounting dimensions optional.
  • +
+

Version 2.0.3

+
    +
  • #60 Update contract quick search to also filter on fields "External reference" and "Comments".
  • +
  • #49 Manage permissions.
  • +
+

Version 2.0.2

+

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

+

Version 2.0.1

+

Add support contract assignement panel to devices.

+

Version 2.0.0

+

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.

+ + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/contributing/index.html b/contributing/index.html new file mode 100644 index 0000000..569fbe7 --- /dev/null +++ b/contributing/index.html @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + Contributing - Netbox-contract NetBox Plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + + + +
+ +
+ + + + +
+
+ + + +
+
+
+ + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Contributing

+ + +

Contributing

+

Contributions are welcome!

+

Types of contributions

+

Report bugs or submit feedback

+

Report bugs and submit feetback here.

+

Fix bugs

+

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

+

Implement features

+

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

+

Coding conventions

+

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’s 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

+

Repository structure

+

There are 2 permanent branch in the repository:

+
    +
  • master - The current stable release. Individual changes should never be pushed directly to this branch, but rather merged from develop.
  • +
  • develop - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
  • +
+

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

+

Setup your development environment

+

1
+2
python -m pip install pre-commit
+pre-commit install
+
+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

    +
    1
    +2
    $ cd netbox
    +$ source venv/netbox/bin/activate
    +
    +
  2. +
  3. +

    Fork the netbox-contract repo on GitHub.

    +
  4. +
  5. +

    Clone your fork locally

    +
    1
    +2
    $ cd ..
    +$ git clone git@github.com:your_name_here/netbox-contract.git
    +
    +
  6. +
  7. +

    Add the plugin to NetBox virtual environment:

    +
    1
    $ python3 -m pip install -e netbox-contract
    +
    +
  8. +
  9. +

    Update the Netbox configuration ans run the database migrations as mentionned in the plugin installation steps.

    +
  10. +
  11. +

    Create a branch for local development:

    +
    1
    $ git checkout -b name-of-your-bugfix-or-feature
    +
    +

    Make your changes locally.

    +
  12. +
  13. +

    You can test your changes using the django development server:

    +
    1
    $ python3 netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure
    +
    +

    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/.

    +
  14. +
  15. +

    Commit your changes and push your branch to GitHub:

    +
    1
    +2
    +3
    $ git add .
    +$ git commit -m "Your detailed description of your changes."
    +$ git push origin name-of-your-bugfix-or-feature
    +
    +
  16. +
  17. +

    Submit a pull request through the GitHub website.

    +
  18. +
+

Pull Request Guidelines

+

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

+
    +
  1. The pull request should include tests.
  2. +
  3. If the pull request adds functionality, the docs should be updated.
  4. +
  5. 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.
  6. +
+

Deploying

+

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/search/search_index.json b/search/search_index.json index bfc144b..d4bffbf 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
"}]} \ No newline at end of file +{"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 diff --git a/sitemap.xml b/sitemap.xml index 7032467..f770ba5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -5,4 +5,14 @@ 2024-05-04 daily + + https://github.com/mlebreuil/netbox-contract/changelog/ + 2024-05-04 + daily + + + https://github.com/mlebreuil/netbox-contract/contributing/ + 2024-05-04 + daily + \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 919833d3b0bc4a832ef6503672881daca676db8f..e9ff54739ab0bac768443cc1818169d58ad21d09 100644 GIT binary patch literal 242 zcmV89V>)8AGt$k)E zwUbj0#ZptvsdQ{4y1W9+^URAU8}+4d%nphf>r&t$g5WPq?V4H(V4dzI0~)nZO2s%& zD~{Fj&^9(R>g4Q4wx4Ry sK72{oC~GwM$@c4%D?6b3FL{^2_Y>9U{`<)HR=<(@2JBCi`gQ^U06LC(=>Px# literal 219 zcmV<103`n(iwFo~MmA;w|8r?{Wo=<_E_iKh08NieZo@DPME5y`p}j>VNP)JHm0eGe z9zd2^TYx^PNXO~zD?3@386*GFC=3crS zAqMOV&OSgw?(?H{IdQR$LBo2oCs^W`2Xj)VbF1E3b*`3|wzIj(rV)P%{+hx1@TXy? VJfp#uZEN*M^A8lxdT$c}000F_W#a$<