Comment 2 for bug 1890546

Revision history for this message
Lê Minh Quân (quanlm1999) wrote :

Hmmm somehow I change somecode in here: ~/kuryr-k8s-controller/kuryr-kubernetes/kuryr_kubernetes/os_vif_util.py

```
 try:
        fixed_ips = neutron_port.get('fixed_ips', [])
        port_id = neutron_port.get('id')
    except TypeError:
        fixed_ips = neutron_port.fixed_ips
        port_id = neutron_port.get.id

    for neutron_fixed_ip in fixed_ips:
        subnet_id = neutron_fixed_ip['subnet_id']
        ip_address = neutron_fixed_ip['ip_address']

```

after some debug

```
 try:
        fixed_ips = neutron_port.fixed_ips
        LOG.info('========================neutron_port.get %s', neutron_port.fixed_ips)
        port_id = neutron_port.get('id')
    except TypeError:
        fixed_ips = neutron_port.fixed_ips
        port_id = neutron_port.get.id

    for neutron_fixed_ip in fixed_ips:
        LOG.info('debug============i %s', fixed_ips)
        subnet_id = neutron_fixed_ip['subnet_id']
        ip_address = neutron_fixed_ip['ip_address']
```

I change the

```
try:
         fixed_ips = neutron_port.get('fixed_ips', [])```

into

```
try:
        fixed_ips = neutron_port.fixed_ips

```

and it work normally although it already have try and expect