File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed
tests/integration/targets Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,11 @@ def _build_query_params(
653
653
value = module_data .get (match )
654
654
query_dict .update ({match : value })
655
655
656
- if parent == "lag" :
656
+ if user_query_params :
657
+ # This is to skip any potential changes using module_data when the user
658
+ # provides user_query_params
659
+ pass
660
+ elif parent == "lag" :
657
661
if not child :
658
662
query_dict ["name" ] = module_data ["lag" ]
659
663
intf_type = self ._fetch_choice_value (
Original file line number Diff line number Diff line change 171
171
- test_eight['msg'] == "ip_address 10.10.1.30/16 created"
172
172
- test_eight['ip_address']['address'] == "10.10.1.30/16"
173
173
- test_eight['ip_address']['family'] == 4
174
- - test_eight['ip_address']['nat_inside'] == 10
174
+ - test_eight['ip_address']['nat_inside'] == 11
175
175
- test_eight['ip_address']['vrf'] == 1
176
176
177
177
- name : " 9 - Create IP address on GigabitEthernet2 - test100 - State: present"
Original file line number Diff line number Diff line change 159
159
- test_seven is changed
160
160
- test_seven["diff"]["after"]["asset_tag"] == "Null"
161
161
- test_seven["device"]["asset_tag"] == "Null"
162
+
163
+ - name : Add ip address to netbox and don't assign it to a device (Issue 372)
164
+ netbox.netbox.netbox_ip_address :
165
+ netbox_url : " http://localhost:32768"
166
+ netbox_token : " 0123456789abcdef0123456789abcdef01234567"
167
+ data :
168
+ address : 10.255.255.1/24
169
+ query_params :
170
+ - address
171
+ - vrf
172
+ state : present
173
+
174
+ - name : Update same ip address to attach to a device interface (Issue 372)
175
+ netbox.netbox.netbox_ip_address :
176
+ netbox_url : " http://localhost:32768"
177
+ netbox_token : " 0123456789abcdef0123456789abcdef01234567"
178
+ data :
179
+ address : 10.255.255.1/24
180
+ assigned_object :
181
+ device : test100
182
+ name : GigabitEthernet1
183
+ query_params :
184
+ - address
185
+ - vrf
186
+ state : present
187
+ register : query_params_372
188
+
189
+ - name : Assert ip address was updated and added to device interface
190
+ assert :
191
+ that :
192
+ - query_params_372 is changed
193
+ - query_params_372['msg'] == 'ip_address 10.255.255.1/24 updated'
194
+ - query_params_372['diff']['after']['assigned_object'] == 3
195
+ - query_params_372['diff']['after']['assigned_object_id'] == 3
196
+ - query_params_372['diff']['after']['assigned_object_type'] == 'dcim.interface'
You can’t perform that action at this time.
0 commit comments