Skip to content

Commit

Permalink
Merge pull request #20 from Onemind-Services-LLC/dev
Browse files Browse the repository at this point in the history
PRVB
  • Loading branch information
abhi1693 authored May 8, 2023
2 parents 0a29130 + 90adc89 commit 1ed63d5
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ body:
attributes:
label: NetBox plugin version
description: What version of the NetBox Secrets plugin are you currently running?
placeholder: v0.0.2
placeholder: v0.1.0
validations:
required: true
- type: input
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.4.3
placeholder: v3.5.1
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.3.10
placeholder: v3.5.1
validations:
required: true
- type: dropdown
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,26 @@

## [Unreleased](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/HEAD)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.0.3...HEAD)
[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.0.4...HEAD)

**Closed issues:**

- I have tried to install the module in the new version of netbox and I realized that it is not compatible, could you please help me. [\#18](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/18)
- \[Bug\]: Application labels aren't unique, duplicates: netbox\_metatype\_importer [\#13](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/13)
- \[Bug\]: urlpattern not define [\#10](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/10)

## [v0.0.4](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.0.4) (2023-02-04)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.0.3...v0.0.4)

**Closed issues:**

- \[Docs\]: Update README to document all configuration options [\#7](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/7)

**Merged pull requests:**

- Fixed issues with missing urlpatterns [\#12](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/pull/12) ([abhi1693](https://github.com/abhi1693))

## [v0.0.3](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.0.3) (2023-01-23)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.0.2...v0.0.3)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NETBOX_VARIANT=v3.4
ARG NETBOX_VARIANT=v3.5

FROM netboxcommunity/netbox:${NETBOX_VARIANT}

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
The plugin uses [GitHub GraphQL API](https://docs.github.com/en/graphql) to load DeviceType and ModuleType from [NetBox Device Type Library](https://github.com/netbox-community/devicetype-library). The plugin loads only file tree representation from GitHub repo and shows it as a table with vendor and model columns. DeviceType definitions files are loaded when you try to import selected models.
To use GraphQL API you need to set GitHub personal access token in plugin settings. How to create the token, see ["Creating a personal access token."](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)

# Compatibility
## Compatibility

| NetBox Version | Plugin Version |
|:----------------:|:--------------:|
| 3.4.x | 0.0.x |
| NetBox Version | Plugin Version |
|:--------------:|:--------------:|
| 3.4.x | 0.0.x |
| 3.5.x | 0.1.x |

# Installation
## Installation

* Install NetBox as per NetBox documentation
* Add to local_requirements.txt:
Expand Down
2 changes: 1 addition & 1 deletion env/netbox.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ REDIS_DATABASE=0
REDIS_HOST=redis
REDIS_INSECURE_SKIP_TLS_VERIFY=false
REDIS_PASSWORD=H733Kdjndks81
SECRET_KEY=r8OwDznj!!dciP9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
SECRET_KEY=r8OwDznj!!dciP9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNjaa
SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567
SUPERUSER_EMAIL=admin@example.com
SUPERUSER_NAME=admin
Expand Down
8 changes: 4 additions & 4 deletions netbox_metatype_importer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from extras.plugins import PluginConfig

from importlib.metadata import metadata

from extras.plugins import PluginConfig

metadata = metadata('netbox_metatype_importer')


Expand All @@ -12,8 +12,8 @@ class NetBoxMetatypeImporterConfig(PluginConfig):
version = metadata.get('Version')
author = metadata.get('Author')
author_email = metadata.get('Author-email')
min_version = '3.4.0'
max_version = '3.4.99'
min_version = '3.5.0'
max_version = '3.5.99'
default_settings = {
'repo_owner': 'netbox-community',
'repo': 'devicetype-library',
Expand Down
4 changes: 2 additions & 2 deletions netbox_metatype_importer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from dcim.models import DeviceType, Manufacturer, ModuleType
from netbox.views import generic
from utilities.exceptions import AbortTransaction, PermissionsViolation
from utilities.forms import ImportForm
from utilities.forms.bulk_import import BulkImportForm
from utilities.views import ContentTypePermissionRequiredMixin, GetReturnURLMixin
from .choices import TypeChoices
from .filters import MetaTypeFilterSet
Expand Down Expand Up @@ -188,7 +188,7 @@ def post(self, request):
vendor_count += 1

for sha, yaml_text in dt_files.items():
form = ImportForm(data={'data': yaml_text, 'format': 'yaml'})
form = BulkImportForm(data={'data': yaml_text, 'format': 'yaml'})
if form.is_valid():
data = form.cleaned_data['data']

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='netbox-metatype-importer',
version='0.0.4',
version='0.1.0',
description='Import Metatypes',
long_description='Import MetaTypes into NetBox',
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 1ed63d5

Please sign in to comment.