示例#1
0
def servers_update_addresses(request, servers, all_tenants=False):
    """Retrieve servers networking information from Neutron if enabled.

       Should be used when up to date networking information is required,
       and Nova's networking info caching mechanism is not fast enough.

    """
    neutron_enabled = base.is_service_enabled(request, 'network')
    if neutron_enabled:
        neutron.servers_update_addresses(request, servers, all_tenants)
示例#2
0
def servers_update_addresses(request, servers, all_tenants=False):
    """Retrieve servers networking information from Neutron if enabled.

       Should be used when up to date networking information is required,
       and Nova's networking info caching mechanism is not fast enough.

    """
    neutron_enabled = base.is_service_enabled(request, 'network')
    if neutron_enabled:
        neutron.servers_update_addresses(request, servers, all_tenants)
示例#3
0
文件: network.py 项目: ywager/horizon
def servers_update_addresses(request, servers, all_tenants=False):
    """Retrieve servers networking information from Neutron if enabled.

       Should be used when up to date networking information is required,
       and Nova's networking info caching mechanism is not fast enough.

    """
    # NOTE(amotoki): This check is still needed because 'instances' panel
    # calls this method. We dropped security group and floating IP support
    # through Nova API (due to novaclient 8.0.0 drops their supports),
    # but we can still support 'Instances' panel with nova-network.
    # TODO(amotoki): Nova networkinfo info caching mechanism is now fast enough
    # as they are updated by Neutron via Nova event callback mechasm,
    # so servers_update_addresses is no longer needed.
    # We can reduce API calls by dropping it.
    neutron_enabled = base.is_service_enabled(request, 'network')
    if neutron_enabled:
        neutron.servers_update_addresses(request, servers, all_tenants)
示例#4
0
def servers_update_addresses(request, servers, all_tenants=False):
    """Retrieve servers networking information from Neutron if enabled.

       Should be used when up to date networking information is required,
       and Nova's networking info caching mechanism is not fast enough.

    """
    # NOTE(amotoki): This check is still needed because 'instances' panel
    # calls this method. We dropped security group and floating IP support
    # through Nova API (due to novaclient 8.0.0 drops their supports),
    # but we can still support 'Instances' panel with nova-network.
    # TODO(amotoki): Nova networkinfo info caching mechanism is now fast enough
    # as they are updated by Neutron via Nova event callback mechasm,
    # so servers_update_addresses is no longer needed.
    # We can reduce API calls by dropping it.
    neutron_enabled = base.is_service_enabled(request, 'network')
    if neutron_enabled:
        neutron.servers_update_addresses(request, servers, all_tenants)