lib/wire/commands/down_command.rb
# run in given zone:
# returns:
# - bool: true if successful, false otherwise
run in given zone:
returns:
bool: true if successful, false otherwise
run in given zone : returns : bool : true if successful false otherwise
def run_on_zone(zone_name)
      b_result = true
      networks = @project.get_element('networks')
      appgroups_in_zone = objects_in_zone('appgroups', zone_name)
      appgroups_in_zone.each do |appgroup_name, appgroup_data|
        $log.debug("Processing appgroup \'#{appgroup_name}\'")
        zone_networks = objects_in_zone('networks', zone_name)
        success = handler.handle_network_attachments(zone_name, zone_networks,
                                                     appgroup_name, appgroup_data,
                                                     @project.target_dir)
        b_result &= success
        success = handler.handle_appgroup(zone_name,
                                          appgroup_name, appgroup_data,
                                          @project.target_dir)
        b_result &= success
      end
      networks_in_zone = UpDownCommand.get_networks_for_zone(networks, zone_name)
      networks_in_zone.each do |network_name, network_data|
        $log.debug("Bringing down network #{network_name}")
        b_result &= default_handle_dhcp(zone_name, network_name, network_data, @handler)
        b_result &= default_handle_hostip(network_name, network_data, @handler)
        success = @handler.handle_bridge(network_name)
        b_result &= success
      end
      b_result
    end
def run_on_zone ( zone_name ) b_result = true networks = @project . get_element ( 'networks' ) appgroups_in_zone = objects_in_zone ( 'appgroups' , zone_name ) appgroups_in_zone . each do | appgroup_name , appgroup_data | $log . debug ( "Processing appgroup \'#{appgroup_name}\'" ) zone_networks = objects_in_zone ( 'networks' , zone_name ) success = handler . handle_network_attachments ( zone_name , zone_networks , appgroup_name , appgroup_data , @project . target_dir ) b_result &= success success = handler . handle_appgroup ( zone_name , appgroup_name , appgroup_data , @project . target_dir ) b_result &= success end networks_in_zone = UpDownCommand . get_networks_for_zone ( networks , zone_name ) networks_in_zone . each do | network_name , network_data | $log . debug ( "Bringing down network #{network_name}" ) b_result &= default_handle_dhcp ( zone_name , network_name , network_data , @handler ) b_result &= default_handle_hostip ( network_name , network_data , @handler ) success = @handler . handle_bridge ( network_name ) b_result &= success end b_result end
run in given zone:
returns:
 bool: true if successful, false otherwise
run in given zone : returns : bool : true if successful false otherwise
# select appgroups in this zone and take them down first # process network attachments # then take down containers # select networks in current zone only # if we have dhcp, unconfigure dnsmasq # if we have a host ip on that bridge, take it down first # we should have a bridge with that name.
zone_name
<not_specific>