def _extend_server(self, context, server, instance):
        key = "%s:mac_addr" % Extended_ips_mac.alias
        networks = common.get_networks_for_instance(context, instance)
        for label, network in networks.items():
            # NOTE(vish): ips are hidden in some states via the
            #             hide_server_addresses extension.
            if label in server['addresses']:
                all_ips = itertools.chain(network["ips"],
                                          network["floating_ips"])
                for i, ip in enumerate(all_ips):
                    server['addresses'][label][i][key] = ip['mac_address']
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/extended_ips_mac.py/ExtendedIpsMacController._extend_server/original