Skip to content

Commit ba47604

Browse files
committed
Add changelog
1 parent cde4a70 commit ba47604

File tree

6 files changed

+6
-17
lines changed

6 files changed

+6
-17
lines changed

changelogs/fragments/1433-add-custom-headers.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
bugfixes:
22
- Add netbox version check to support service creation for netbox version prior of 4.3
33
- Use dedicated function to check netbox version istead of self.full_version for rack.
4+
- Fix typos in tag integration tests.
5+
- Fix integration test for circuit termination, missing assignment
6+
- Fix integration test for service

docs/getting_started/contributing/modules/architecture.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,10 @@ We set several instance attributes that are used within other methods throughout
284284
url = self.module.params["netbox_url"]
285285
token = self.module.params["netbox_token"]
286286
ssl_verify = self.module.params["validate_certs"]
287-
headers = self.module.params["headers"]
288287
289288
# Attempt to initiate connection to NetBox
290289
if nb_client is None:
291-
self.nb = self._connect_netbox_api(url, token, ssl_verify, headers)
290+
self.nb = self._connect_netbox_api(url, token, ssl_verify)
292291
else:
293292
self.nb = nb_client
294293
try:

plugins/doc_fragments/common.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,4 @@ class ModuleDocFragment(object):
5050
- Certificate path
5151
required: false
5252
type: raw
53-
headers:
54-
description: Dictionary of headers to be passed to the NetBox API.
55-
required: false
56-
type: dict
5753
"""

plugins/module_utils/netbox_utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@
723723
query_params=dict(required=False, type="list", elements="str"),
724724
validate_certs=dict(type="raw", default=True),
725725
cert=dict(type="raw", required=False),
726-
headers=dict(type="dict", required=False),
727726
)
728727

729728

@@ -752,11 +751,10 @@ def __init__(self, module, endpoint, nb_client=None):
752751
token = self.module.params["netbox_token"]
753752
ssl_verify = self.module.params["validate_certs"]
754753
cert = self.module.params["cert"]
755-
headers = self.module.params["headers"]
756754

757755
# Attempt to initiate connection to NetBox
758756
if nb_client is None:
759-
self.nb = self._connect_netbox_api(url, token, ssl_verify, cert, headers)
757+
self.nb = self._connect_netbox_api(url, token, ssl_verify, cert)
760758
else:
761759
self.nb = nb_client
762760
try:
@@ -806,14 +804,10 @@ def _version_check_greater(self, greater, lesser, greater_or_equal=False):
806804

807805
return False
808806

809-
def _connect_netbox_api(self, url, token, ssl_verify, cert, headers={}):
807+
def _connect_netbox_api(self, url, token, ssl_verify, cert):
810808
try:
811809
session = requests.Session()
812810
session.verify = ssl_verify
813-
if isinstance(headers, str):
814-
headers = json.load(headers)
815-
if isinstance(headers, dict):
816-
session.headers.update(headers)
817811
if cert:
818812
session.cert = tuple(i for i in cert)
819813
nb = pynetbox.api(url, token=token)

tests/unit/module_utils/test_netbox_base_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def fixture_arg_spec():
6363
"state": "present",
6464
"validate_certs": False,
6565
"cert": None,
66-
"headers": None,
6766
}
6867

6968

0 commit comments

Comments
 (0)