def get_network_domain_by_name(driver, name, location):
 networks = driver.ex_list_network_domains(location=location)
 found_networks = [network for network in networks if (network.name == name)]
 if (not found_networks):
  raise UnknownNetworkError(("Network '%s' could not be found" % name))
 return found_networks[0]

def get_network_domain_by_name ( driver , name , location ) : networks = driver . ex_list_network_domains ( location = location ) found_networks = [ network for network in networks if ( network . name == name ) ] if ( not found_networks ) : raise UnknownNetworkError ( ( "Network '%s' could not be found" % name ) ) return found_networks [ 0 ]
get a network domain object by its name .