Changeset 1488

Show
Ignore:
Timestamp:
04/08/08 15:14:41 (5 months ago)
Author:
kindlund
Message:

Performing unit testing on Clone.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-simpler_agent/lib/HoneyClient/Manager/VM/Clone.pm

    r1486 r1488  
    859859                    # Warn if no valid fingerprint is supplied. 
    860860                    $LOG->warn("(" . $self->{'name'} . ") - No valid fingerprint found."); 
    861                     Carp::carp "(" . $self->{'name'} . ") - No valid fingerprint found."; 
     861                    Carp::carp __PACKAGE__ . "->_changeStatus(): (" . $self->{'name'} . ") - No valid fingerprint found."; 
    862862 
    863863                    # Mark the VM as suspicious, manually. 
     
    12401240    $self->{'_fw_handle'} = getClientHandle(namespace => "HoneyClient::Manager::FW"); 
    12411241 
    1242     # TODO: Fix this, eventually. 
    1243     $LOG->info("Installing default firewall rules."); 
    1244     # XXX: Currently, faults get propagated -- is this okay? 
    1245     $self->{'_fw_handle'}->installDefaultRules(); 
     1242    # Install the default firewall rules only if we're being called by code 
     1243    # other than HoneyClient::Manager or by ourselves. 
     1244    if (($caller ne __PACKAGE__) && ($caller ne "HoneyClient::Manager")) { 
     1245        $LOG->info("Installing default firewall rules."); 
     1246        # XXX: Currently, faults get propagated -- is this okay? 
     1247        $self->{'_fw_handle'}->installDefaultRules(); 
     1248    } 
    12461249 
    12471250    # Determine if the firewall needs to be bypassed. 
     
    16611664    } 
    16621665 
    1663     # TODO: Add more error handling? 
    1664  
    16651666    return $self; 
    16661667}