File tree Expand file tree Collapse file tree
tests/functional/compute/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -655,10 +655,9 @@ def take_action(self, parsed_args):
655655 nic_info ["port-id" ] = port .id
656656 else :
657657 if nic_info ["net-id" ]:
658- nic_info ["net-id" ] = utils .find_resource (
659- compute_client .networks ,
658+ nic_info ["net-id" ] = compute_client .api .network_find (
660659 nic_info ["net-id" ]
661- ). id
660+ )[ 'id' ]
662661 if nic_info ["port-id" ]:
663662 msg = _ ("can't create server with port specified "
664663 "since network endpoint not enabled" )
Original file line number Diff line number Diff line change @@ -207,12 +207,20 @@ def test_server_attach_detach_floating_ip(self):
207207 'floating ip create -f json ' +
208208 'public'
209209 ))
210- floating_ip = cmd_output ['floating_ip_address' ]
210+
211+ # Look for Neutron value first, then nova-net
212+ floating_ip = cmd_output .get (
213+ 'floating_ip_address' ,
214+ cmd_output .get (
215+ 'ip' ,
216+ None ,
217+ ),
218+ )
211219 self .assertNotEqual ('' , cmd_output ['id' ])
212220 self .assertNotEqual ('' , floating_ip )
213221 self .addCleanup (
214222 self .openstack ,
215- 'floating ip delete ' + cmd_output ['id' ]
223+ 'floating ip delete ' + str ( cmd_output ['id' ])
216224 )
217225
218226 raw_output = self .openstack (
You can’t perform that action at this time.
0 commit comments