

def set_admin_ip_for_for_single_interface(self, interfaces):
    'Set admin ip for single interface if it not setted yet.'
    ips = [interface.get('ip') for interface in interfaces]
    admin_ips = [ip for ip in ips if self.network_manager.is_ip_belongs_to_admin_subnet(ip)]
    if (not admin_ips):
        admin_cidr = NetworkGroup.get_admin_network_group().cidr
        interfaces[0]['ip'] = str(IPNetwork(admin_cidr).ip)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/base.py EnvironmentManager.set_admin_ip_for_for_single_interface/original