File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
tests/integration/targets/inventory/files Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -831,10 +831,13 @@ def refresh_ipaddresses(self):
831
831
interface_id = ipaddress ["interface" ]["id" ]
832
832
ip_id = ipaddress ["id" ]
833
833
834
- self .ipaddresses_lookup [interface_id ][ip_id ] = ipaddress
834
+ # We need to copy the ipaddress entry to preserve the original in case caching is used.
835
+ ipaddress_copy = ipaddress .copy ()
836
+
837
+ self .ipaddresses_lookup [interface_id ][ip_id ] = ipaddress_copy
835
838
836
839
# Remove "interface" attribute, as that's redundant when ipaddress is added to an interface
837
- del ipaddress ["interface" ]
840
+ del ipaddress_copy ["interface" ]
838
841
839
842
@property
840
843
def lookup_processes (self ):
Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ api_endpoint: "http://localhost:32768"
3
3
token : " 0123456789abcdef0123456789abcdef01234567"
4
4
validate_certs : False
5
5
6
+ # Use cache on this test to make sure interfaces is tested via the cache
7
+ cache : True
8
+ cache_timeout : 3600
9
+ cache_plugin : jsonfile
10
+ cache_connection : /tmp/inventory_netbox
11
+
12
+
6
13
config_context : True
7
14
flatten_config_context : True
8
15
flatten_custom_fields : True
You can’t perform that action at this time.
0 commit comments