mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
lint fixes
This commit is contained in:
parent
0c53a2bb06
commit
fd449a12d9
@ -25,11 +25,12 @@
|
|||||||
// "source.organizeImports": true
|
// "source.organizeImports": true
|
||||||
// }
|
// }
|
||||||
//},
|
//},
|
||||||
"python.sortImports.args": [
|
"isort.args": [
|
||||||
"--profile=black"
|
"--profile=black"
|
||||||
],
|
],
|
||||||
"python.sortImports.path": "/opt/netbox/venv/bin/isort",
|
"isort.path": "/opt/netbox/venv/bin/isort",
|
||||||
"python.analysis.typeCheckingMode": "strict",
|
"python.analysis.typeCheckingMode": "strict",
|
||||||
|
python.Jedi
|
||||||
"python.analysis.extraPaths": [
|
"python.analysis.extraPaths": [
|
||||||
"/opt/netbox/netbox"
|
"/opt/netbox/netbox"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '3.4'
|
version: '3.4'
|
||||||
services:
|
services:
|
||||||
netbox:
|
netbox:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
version: '3.4'
|
version: '3.4'
|
||||||
services:
|
services:
|
||||||
netbox: &netbox
|
netbox: &netbox
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- prefix: 10.0.0.0/16
|
- prefix: 10.0.0.0/16
|
||||||
rir: RFC1918
|
rir: RFC1918
|
||||||
tenant: tenant1
|
tenant: tenant1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- asn: 1
|
- asn: 1
|
||||||
rir: RFC1918
|
rir: RFC1918
|
||||||
tenant: tenant1
|
tenant: tenant1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Required parameters for termination X ('a' or 'b'):
|
# Required parameters for termination X ('a' or 'b'):
|
||||||
#
|
#
|
||||||
# ```
|
# ```
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: VPLS
|
- name: VPLS
|
||||||
slug: vpls
|
slug: vpls
|
||||||
- name: MPLS
|
- name: MPLS
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- cid: Circuit_ID-1
|
- cid: Circuit_ID-1
|
||||||
provider: Provider1
|
provider: Provider1
|
||||||
type: Internet
|
type: Internet
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Group 1
|
- name: Group 1
|
||||||
slug: group-1
|
slug: group-1
|
||||||
- name: Group 2
|
- name: Group 2
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
- name: Hyper-V
|
- name: Hyper-V
|
||||||
slug: hyper-v
|
slug: hyper-v
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: cluster1
|
- name: cluster1
|
||||||
type: Hyper-V
|
type: Hyper-V
|
||||||
group: Group 1
|
group: Group 1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Network-Team
|
- name: Network-Team
|
||||||
slug: network-team
|
slug: network-team
|
||||||
description: This is a new contact group for the Network-Team
|
description: This is a new contact group for the Network-Team
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: New Contact Role
|
- name: New Contact Role
|
||||||
slug: new-contact-role
|
slug: new-contact-role
|
||||||
description: This is a new contact role description
|
description: This is a new contact role description
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Lee Widget
|
- name: Lee Widget
|
||||||
title: CEO of Widget Corp
|
title: CEO of Widget Corp
|
||||||
phone: 221-555-1212
|
phone: 221-555-1212
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## type:
|
## type:
|
||||||
## - text
|
## - text
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## new_window:
|
## new_window:
|
||||||
## - True
|
## - True
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: switch
|
- name: switch
|
||||||
slug: switch
|
slug: switch
|
||||||
color: Grey
|
color: Grey
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- model: Model 1
|
- model: Model 1
|
||||||
manufacturer: Manufacturer 1
|
manufacturer: Manufacturer 1
|
||||||
slug: model-1
|
slug: model-1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## face:
|
## face:
|
||||||
## - front
|
## - front
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
applications:
|
applications:
|
||||||
users:
|
users:
|
||||||
- technical_user
|
- technical_user
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## type:
|
## type:
|
||||||
## - virtual
|
## - virtual
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## status:
|
## status:
|
||||||
## - active
|
## - active
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: cage 101
|
- name: cage 101
|
||||||
slug: cage-101
|
slug: cage-101
|
||||||
site: SING 1
|
site: SING 1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Manufacturer 1
|
- name: Manufacturer 1
|
||||||
slug: manufacturer-1
|
slug: manufacturer-1
|
||||||
- name: Manufacturer 2
|
- name: Manufacturer 2
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
all.ro:
|
all.ro:
|
||||||
actions:
|
actions:
|
||||||
- view
|
- view
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Platform 1
|
- name: Platform 1
|
||||||
slug: platform-1
|
slug: platform-1
|
||||||
manufacturer: Manufacturer 1
|
manufacturer: Manufacturer 1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: power feed 1
|
- name: power feed 1
|
||||||
power_panel: power panel AMS 1
|
power_panel: power panel AMS 1
|
||||||
voltage: 208
|
voltage: 208
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: power panel AMS 1
|
- name: power panel AMS 1
|
||||||
site: AMS 1
|
site: AMS 1
|
||||||
- name: power panel SING 1
|
- name: power panel SING 1
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
- name: Main Management
|
- name: Main Management
|
||||||
slug: main-management
|
slug: main-management
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## status:
|
## status:
|
||||||
## - container
|
## - container
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Provider1
|
- name: Provider1
|
||||||
slug: provider1
|
slug: provider1
|
||||||
asn: 121
|
asn: 121
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Role 1
|
- name: Role 1
|
||||||
slug: role-1
|
slug: role-1
|
||||||
color: Pink
|
color: Pink
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## width:
|
## width:
|
||||||
## - 19
|
## - 19
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Singapore
|
- name: Singapore
|
||||||
slug: singapore
|
slug: singapore
|
||||||
- name: Amsterdam
|
- name: Amsterdam
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- is_private: true
|
- is_private: true
|
||||||
name: RFC1918
|
name: RFC1918
|
||||||
slug: rfc1918
|
slug: rfc1918
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: 65000:1001
|
- name: 65000:1001
|
||||||
tenant: tenant1
|
tenant: tenant1
|
||||||
- name: 65000:1002
|
- name: 65000:1002
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: DNS
|
- name: DNS
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: AMS 1
|
- name: AMS 1
|
||||||
slug: ams1
|
slug: ams1
|
||||||
region: Downtown
|
region: Downtown
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Tag 1
|
- name: Tag 1
|
||||||
slug: tag-1
|
slug: tag-1
|
||||||
color: Pink
|
color: Pink
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: Tenant Group 1
|
- name: Tenant Group 1
|
||||||
slug: tenant-group-1
|
slug: tenant-group-1
|
||||||
- name: Tenant Group 2
|
- name: Tenant Group 2
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: tenant1
|
- name: tenant1
|
||||||
slug: tenant1
|
slug: tenant1
|
||||||
- name: tenant2
|
- name: tenant2
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
technical_user:
|
technical_user:
|
||||||
api_token: "" # a token is generated automatically unless the value is explicity set to empty
|
api_token: "" # a token is generated automatically unless the value is explicity set to empty
|
||||||
reader:
|
reader:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## status:
|
## status:
|
||||||
## - active
|
## - active
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- description: Network Interface 1
|
- description: Network Interface 1
|
||||||
enabled: true
|
enabled: true
|
||||||
mac_address: 00:77:77:77:77:77
|
mac_address: 00:77:77:77:77:77
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- name: VLAN group 1
|
- name: VLAN group 1
|
||||||
scope_type: dcim.region
|
scope_type: dcim.region
|
||||||
scope: Amsterdam
|
scope: Amsterdam
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## status:
|
## status:
|
||||||
## - active
|
## - active
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
- enforce_unique: true
|
- enforce_unique: true
|
||||||
name: vrf1
|
name: vrf1
|
||||||
tenant: tenant1
|
tenant: tenant1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
## Possible Choices:
|
## Possible Choices:
|
||||||
## object_types:
|
## object_types:
|
||||||
## - device
|
## - device
|
||||||
|
|||||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@ -14,10 +14,10 @@ name: "CodeQL"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "dev" ]
|
branches: ["dev"]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ "dev" ]
|
branches: ["dev"]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '24 4 * * 5'
|
- cron: '24 4 * * 5'
|
||||||
|
|
||||||
@ -33,8 +33,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'python' ]
|
language: ['python']
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
# CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby']
|
||||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
4
.github/workflows/super-linter.yml
vendored
4
.github/workflows/super-linter.yml
vendored
@ -9,9 +9,9 @@ name: Lint Code Base
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "dev" ]
|
branches: ["dev"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "dev" ]
|
branches: ["dev"]
|
||||||
jobs:
|
jobs:
|
||||||
run-lint:
|
run-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -37,15 +37,11 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args:
|
args:
|
||||||
- "--py37-plus"
|
- "--py39-plus"
|
||||||
#- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
# rev: v1.26.3
|
rev: v1.29.0
|
||||||
# hooks:
|
|
||||||
# - id: yamllint
|
|
||||||
- repo: https://github.com/psf/black
|
|
||||||
rev: 22.12.0
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: yamllint
|
||||||
#- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
|
#- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
|
||||||
# rev: v1.1.2
|
# rev: v1.1.2
|
||||||
# hooks:
|
# hooks:
|
||||||
|
|||||||
@ -27,8 +27,8 @@ This project just looks to build on top of this framework and model presented.
|
|||||||
|
|
||||||
This project is currently maintained jointly by:
|
This project is currently maintained jointly by:
|
||||||
|
|
||||||
* [Abhimanyu Saharan](https://github.com/abhi1693)
|
- [Abhimanyu Saharan](https://github.com/abhi1693)
|
||||||
* [Ryan Merolle](https://github.com/ryanmerolle)
|
- [Ryan Merolle](https://github.com/ryanmerolle)
|
||||||
|
|
||||||
See the [CONTRIBUTING](CONTRIBUTING.md) for more information.
|
See the [CONTRIBUTING](CONTRIBUTING.md) for more information.
|
||||||
|
|
||||||
|
|||||||
@ -64,10 +64,11 @@ class Migration(migrations.Migration):
|
|||||||
models.Q(("app_label", "dcim"), ("model", "device")),
|
models.Q(("app_label", "dcim"), ("model", "device")),
|
||||||
models.Q(("app_label", "dcim"), ("model", "virtualchassis")),
|
models.Q(("app_label", "dcim"), ("model", "virtualchassis")),
|
||||||
models.Q(
|
models.Q(
|
||||||
("app_label", "virtualization"), ("model", "virtualmachine")
|
("app_label", "virtualization"),
|
||||||
|
("model", "virtualmachine"),
|
||||||
),
|
),
|
||||||
_connector="OR",
|
_connector="OR",
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
on_delete=django.db.models.deletion.PROTECT,
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
to="contenttypes.contenttype",
|
to="contenttypes.contenttype",
|
||||||
@ -82,7 +83,7 @@ class Migration(migrations.Migration):
|
|||||||
django.core.validators.RegexValidator(
|
django.core.validators.RegexValidator(
|
||||||
"^[0-9a-zA-Z,-,_]*$",
|
"^[0-9a-zA-Z,-,_]*$",
|
||||||
"Only alphanumeric, hyphens, and underscores characters are allowed.",
|
"Only alphanumeric, hyphens, and underscores characters are allowed.",
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -111,7 +112,8 @@ class Migration(migrations.Migration):
|
|||||||
model_name="aclinterfaceassignment",
|
model_name="aclinterfaceassignment",
|
||||||
name="access_list",
|
name="access_list",
|
||||||
field=models.ForeignKey(
|
field=models.ForeignKey(
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="netbox_acls.accesslist"
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
to="netbox_acls.accesslist",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
@ -127,10 +129,11 @@ class Migration(migrations.Migration):
|
|||||||
models.Q(
|
models.Q(
|
||||||
models.Q(("app_label", "dcim"), ("model", "interface")),
|
models.Q(("app_label", "dcim"), ("model", "interface")),
|
||||||
models.Q(
|
models.Q(
|
||||||
("app_label", "virtualization"), ("model", "vminterface")
|
("app_label", "virtualization"),
|
||||||
|
("model", "vminterface"),
|
||||||
),
|
),
|
||||||
_connector="OR",
|
_connector="OR",
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
on_delete=django.db.models.deletion.PROTECT,
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
to="contenttypes.contenttype",
|
to="contenttypes.contenttype",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user