Repository: netbox-community/netbox

Issue:
Add additional options to 'rear ports', 'front ports', and 'power' types
### NetBox version

v3.2.0

### Feature type

Change to existing functionality

### Proposed functionality

Type 'other' is available for interfaces, but no such generalized option exists for 'front port', 'rear port', or 'power' connector types.
A list of every single possible connector type for these connections would not be feasible, so unless users have the ability to add options themselves (which is outside the scope of this request) the next best option is to add an 'other' type to each of those options drop down lists.

### Use case

There are many more connector types available than what is listed for rear port, front port, and power type connections. Adding an 'other' option to these drop down lists would allow users to select something if their particular connector is not listed, rather than not filling in the data at all.

### Database changes

_No response_

### External dependencies

_No response_


Discussion:
> A list of every single possible connector type for these connections would not be feasible

Sure it is. We see proposals for new types occasionally, but what exists in NetBox today is fairly exhaustive. There is of course a finite set of such hardware in common use, and this approach has enabled us to compile the massive community-sourced [device type library](https://github.com/netbox-community/devicetype-library).

Proposals to add real, well-defined component types that have not yet been added are welcomed and appreciated. Still, adding "other" as a catch-all is fine too.
How did https://github.com/netbox-community/netbox/issues/9192 make it into 3.2.2 before this one?
@cyr0nk0r if you hover over the `status: needs owner` label you will see the description:

>This issue is tentatively accepted pending a volunteer committed to its implementation

A volunteer implemented the suggested change in the issue you linked. That's why it was added.

Resolving patch:
diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py
--- a/netbox/dcim/choices.py
+++ b/netbox/dcim/choices.py
@@ -354,6 +354,7 @@ class PowerPortTypeChoices(ChoiceSet):
     TYPE_UBIQUITI_SMARTPOWER = 'ubiquiti-smartpower'
     # Other
     TYPE_HARDWIRED = 'hardwired'
+    TYPE_OTHER = 'other'
 
     CHOICES = (
         ('IEC 60320', (
@@ -471,6 +472,7 @@ class PowerPortTypeChoices(ChoiceSet):
         )),
         ('Other', (
             (TYPE_HARDWIRED, 'Hardwired'),
+            (TYPE_OTHER, 'Other'),
         )),
     )
 
@@ -580,6 +582,7 @@ class PowerOutletTypeChoices(ChoiceSet):
     TYPE_UBIQUITI_SMARTPOWER = 'ubiquiti-smartpower'
     # Other
     TYPE_HARDWIRED = 'hardwired'
+    TYPE_OTHER = 'other'
 
     CHOICES = (
         ('IEC 60320', (
@@ -690,6 +693,7 @@ class PowerOutletTypeChoices(ChoiceSet):
         )),
         ('Other', (
             (TYPE_HARDWIRED, 'Hardwired'),
+            (TYPE_OTHER, 'Other'),
         )),
     )
 
@@ -1047,6 +1051,7 @@ class PortTypeChoices(ChoiceSet):
     TYPE_URM_P2 = 'urm-p2'
     TYPE_URM_P4 = 'urm-p4'
     TYPE_URM_P8 = 'urm-p8'
+    TYPE_OTHER = 'other'
 
     CHOICES = (
         (
@@ -1099,6 +1104,12 @@ class PortTypeChoices(ChoiceSet):
                 (TYPE_URM_P4, 'URM-P4'),
                 (TYPE_URM_P8, 'URM-P8'),
                 (TYPE_SPLICE, 'Splice'),
+            ),
+        ),
+        (
+            'Other',
+            (
+                (TYPE_OTHER, 'Other'),
             )
         )
     )


Test patch: