Skip to content

Commit 082693b

Browse files
committed
fixed typos
1 parent 8713dd1 commit 082693b

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

.devcontainer/initializers/cables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ```
44
# termination_x_name -> name of interface
55
# termination_x_device -> name of the device interface belongs to
6-
# termination_x_class -> required if different than 'Interface' which is the default
6+
# termination_x_class -> required if different from 'Interface' which is the default
77
# ```
88
#
99
# Supported termination classes: Interface, ConsolePort, ConsoleServerPort, FrontPort, RearPort, PowerPort, PowerOutlet

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Reporting Bugs
44

55
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases)
6-
of NetBox or this plugin [latest stable version](https://github.com/ryanmerolle/netbox-acls/releases).
6+
of NetBox or this plugin is at [latest stable version](https://github.com/ryanmerolle/netbox-acls/releases).
77
If you're running an older version, it's possible that the bug has already been fixed
8-
or you are running a version of the plugin not tested with the NetBox version
8+
or, you are running a version of the plugin not tested with the NetBox version
99
you are running [Compatibility Matrix](./README.md#compatibility).
1010

1111
* Next, check the GitHub [issues list](https://github.com/ryanmerolle/netbox-acls/issues)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Based on the NetBox plugin tutorial by [jeremystretch](https://github.com/jeremy
1919
- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)
2020
- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)
2121

22-
All credit should go to Jeremy. Thanks Jeremy!
22+
All credit should go to Jeremy. Thanks, Jeremy!
2323

2424
This project just looks to build on top of this framework and model presented.
2525

@@ -69,12 +69,12 @@ PLUGINS_CONFIG = {
6969
To develop this plugin further one can use the included .devcontainer configuration. This configuration creates a docker container which includes a fully working netbox installation. Currently it should work when using WSL 2. For this to work make sure you have Docker Desktop installed and the WSL 2 integrations activated.
7070

7171
1. In the WSL terminal, enter `code` to run Visual studio code.
72-
1. Install the devcontainer extension "ms-vscode-remote.remote-containers"
73-
1. Press Ctrl+Shift+P and use the "Dev Container: Clone Repository in Container Volume" function to clone this repository. This will take a while depending on your computer
74-
1. If you'd like the netbox instance to be prepopulated run `make Makefile example_initializers` and `make Makefile load_initializers`
75-
1. Start the netbox instance using `make Makefile all`
72+
2. Install the devcontainer extension "ms-vscode-remote.remote-containers"
73+
3. Press Ctrl+Shift+P and use the "Dev Container: Clone Repository in Container Volume" function to clone this repository. This will take a while depending on your computer
74+
4. If you'd like the netbox instance to be prepopulated run `make Makefile example_initializers` and `make Makefile load_initializers`
75+
5. Start the netbox instance using `make Makefile all`
7676

77-
Your netbox instance will be served under 0.0.0.0:8000 so it should now be available under localhost:8000.
77+
Your netbox instance will be served under 0.0.0.0:8000, so it should now be available under localhost:8000.
7878

7979
## Screenshots
8080

netbox_acls/api/serializers.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def validate(self, data):
9696

9797
# Check that the GFK object is valid.
9898
if "assigned_object_type" in data and "assigned_object_id" in data:
99+
# TODO: This can removed after https://github.com/netbox-community/netbox/issues/10221 is fixed.
99100
try:
100101
assigned_object = data[ # noqa: F841
101102
"assigned_object_type"
@@ -167,15 +168,16 @@ def get_assigned_object(self, obj):
167168

168169
def validate(self, data):
169170
"""
170-
Validate the AccessList django model model's inputs before allowing it to update the instance.
171+
Validate the AccessList django model's inputs before allowing it to update the instance.
171172
- Check that the GFK object is valid.
172173
- Check that the associated interface's parent host has the selected ACL defined.
173174
"""
174175
error_message = {}
175176
acl_host = data["access_list"].assigned_object
176177

177-
# Check that the GFK object is vlaid.
178+
# Check that the GFK object is valid.
178179
if "assigned_object_type" in data and "assigned_object_id" in data:
180+
# TODO: This can removed after https://github.com/netbox-community/netbox/issues/10221 is fixed.
179181
try:
180182
assigned_object = data[ # noqa: F841
181183
"assigned_object_type"
@@ -255,7 +257,7 @@ class Meta:
255257

256258
def validate(self, data):
257259
"""
258-
Validate the ACLStandardRule django model model's inputs before allowing it to update the instance:
260+
Validate the ACLStandardRule django model's inputs before allowing it to update the instance:
259261
- Check if action set to remark, but no remark set.
260262
- Check if action set to remark, but source_prefix set.
261263
"""
@@ -324,7 +326,7 @@ class Meta:
324326

325327
def validate(self, data):
326328
"""
327-
Validate the ACLExtendedRule django model model's inputs before allowing it to update the instance:
329+
Validate the ACLExtendedRule django model's inputs before allowing it to update the instance:
328330
- Check if action set to remark, but no remark set.
329331
- Check if action set to remark, but source_prefix set.
330332
- Check if action set to remark, but source_ports set.

netbox_acls/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AccessListEditView(generic.ObjectEditView):
9090

9191
class AccessListDeleteView(generic.ObjectDeleteView):
9292
"""
93-
Defines the delete view for the AccessLists django model.
93+
Defines delete view for the AccessLists django model.
9494
"""
9595

9696
queryset = models.AccessList.objects.all()
@@ -138,7 +138,7 @@ class ACLInterfaceAssignmentEditView(generic.ObjectEditView):
138138

139139
class ACLInterfaceAssignmentDeleteView(generic.ObjectDeleteView):
140140
"""
141-
Defines the delete view for the ACLInterfaceAssignments django model.
141+
Defines delete view for the ACLInterfaceAssignments django model.
142142
"""
143143

144144
queryset = models.ACLInterfaceAssignment.objects.all()
@@ -185,7 +185,7 @@ class ACLStandardRuleEditView(generic.ObjectEditView):
185185

186186
class ACLStandardRuleDeleteView(generic.ObjectDeleteView):
187187
"""
188-
Defines the delete view for the ACLStandardRules django model.
188+
Defines delete view for the ACLStandardRules django model.
189189
"""
190190

191191
queryset = models.ACLStandardRule.objects.all()
@@ -232,7 +232,7 @@ class ACLExtendedRuleEditView(generic.ObjectEditView):
232232

233233
class ACLExtendedRuleDeleteView(generic.ObjectDeleteView):
234234
"""
235-
Defines the delete view for the ACLExtendedRules django model.
235+
Defines delete view for the ACLExtendedRules django model.
236236
"""
237237

238238
queryset = models.ACLExtendedRule.objects.all()

0 commit comments

Comments
 (0)