

def test_get_device_info_for_agent_no_mgmt_port(self):
    device_id = 'device_XYZ'
    with self.hosting_device_template() as hdt:
        creds = device_manager_test_support._uuid()
        mgmt_ip = '192.168.0.55'
        with self.hosting_device(device_id=device_id, template_id=hdt['hosting_device_template']['id'], management_ip_address=mgmt_ip, management_port_id=None, credentials_id=creds) as hd:
            context = device_id._get_test_context(tenant_id=hdt['hosting_device_template']['tenant_id'], is_admin=True)
            hd_id = hd['hosting_device']['id']
            hd_db = self._devmgr._get_hosting_device(context, hd_id)
            info = self._devmgr.get_device_info_for_agent(context, hd_db)
            self.assertEqual(mgmt_ip, info['management_ip_address'])

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_db_device_manager.py TestDeviceManagerDBPlugin.test_get_device_info_for_agent_no_mgmt_port/VarMisuse@75/137 `self`->`device_id`