Remove the virtual environment completely
341476
def remove(self):
        '''
        
        '''
        print 'remove'
        if self.exists():
            print 'cleaning', self.venv
            run('rm -rf {}'.format(self.venv))
106257
def detach_virtual_server(self, ticket_id=None, virtual_id=None):
        
        return self.ticket.removeAttachedVirtualGuest(virtual_id, id=ticket_id)
1251100
def eject_virtual_media(self, device='FLOPPY'):
        """"""
        vm_status = self.get_vm_status(device=device)
        if vm_status['IMAGE_INSERTED'] == 'NO':
            return

        dic = {'DEVICE': device.upper()}
        self._execute_command(
            'EJECT_VIRTUAL_MEDIA', 'RIB_INFO', 'write', dic)
503746
def remove(cls, resource_id, parent_id=None, grandparent_id=None,
               wait=True, timeout=None):
        """"""
        raise exception.NotSupported(feature="DELETE",
                                     context="VirtualSwitchManager")
192488
def _remove_existing(self):
        
        for key in self._keys:
            if key in os.environ:
                LOG.debug('%r: removing old key %r', self, key)
                del os.environ[key]
        self._keys = []
1143957
def remove(self, delete=True):
        
        if self.state >= library.MachineState.running:
            session = virtualbox.Session()
            self.lock_machine(session, library.LockType.shared)
            try:
                progress = session.console.power_down()
                progress.wait_for_completion(-1)
            except Exception:
                print("Error powering off machine", file=sys.stderr)
            session.unlock_machine()
            time.sleep(0.5)  # TODO figure out how to ensure session is really unlocked...

        settings_dir = os.path.dirname(self.settings_file_path)
        if delete:
            option = library.CleanupMode.detach_all_return_hard_disks_only
        else:
            option = library.CleanupMode.detach_all_return_none
        media = self.unregister(option)
        if delete:
            progress = self.delete_config(media)
            progress.wait_for_completion(-1)
            media = []

        # if delete - At some point in time virtualbox didn't do a full cleanup
        #             of this dir. Let's double check it has been cleaned up.
        if delete and os.path.exists(settings_dir):
            shutil.rmtree(settings_dir)

        return media
733698
def cleanup
      @logger.notify "Cleaning up OpenStack"
      @vms.each do |vm|
        cleanup_storage(vm) if @options[:openstack_volume_support]
        @logger.debug "Release floating IPs for OpenStack host #{vm.name}"
        floating_ips = vm.all_addresses # fetch and release its floating IPs
        floating_ips.each do |address|
          @compute_client.disassociate_address(vm.id, address['ip'])
          @compute_client.release_address(address['id'])
        end
        @logger.debug "Destroying OpenStack host #{vm.name}"
        vm.destroy
        if @options[:openstack_keyname].nil?
          @logger.debug "Deleting random keypair"
          @compute_client.delete_key_pair vm.key_name
        end
      end
    end
1297124
def delete(self):
        """"""
        if lib.EnvDeleteInstance(self._env, self._ist) != 1:
            raise CLIPSError(self._env)
686961
def remove_environment(env)
      # Do not remove the content view environment, if there is still a view
      # version in the environment.
      if self.versions.in_environment(env).blank?
        view_env = self.content_view_environments.where(:environment_id => env.id)
        view_env.first.destroy unless view_env.blank?
      end
    end
507042
function cleanup()
    {
        $this->HTTP->removeSessionVariable( $this->StorageName . $this->MetaDataName );
        $this->HTTP->removeSessionVariable( $this->StorageName . $this->VariableListName );
        $this->MetaData = array();
        $this->VariableList = array();
    }
1332276
def reset_env(exclude=[]):
    """"""
    if os.getenv(env.INITED):
        wandb_keys = [key for key in os.environ.keys() if key.startswith(
            'WANDB_') and key not in exclude]
        for key in wandb_keys:
            del os.environ[key]
        return True
    else:
        return False
902096
def remove(self):
        """"""
        if self.exists() or self.islink():
            self.fs.unlink(self.get_internal_path())
            return 1
        return None
419722
def revert(self):
        
        os.environ.clear()
        os.environ.update(self.original)
243776
def clear(self):
        """"""
        if lib.EnvDeleteActivation(self._env, ffi.NULL) != 1:
            raise CLIPSError(self._env)
641645
def remove(self):
        
        LOGGER.debug("Environment.remove")
        if self.id is None:
            return None
        else:
            params = {
                'id': self.id
            }
            args = {'http_operation': 'GET', 'operation_path': 'delete', 'parameters': params}
            response = EnvironmentService.requester.call(args)
            if response.rc != 0:
                LOGGER.warning(
                    'Environment.remove - Problem while deleting environment ' + self.name +
                    '. Reason: ' + str(response.response_content) + '-' + str(response.error_message) +
                    " (" + str(response.rc) + ")"
                )
                return self
            else:
                return None
485955
def cleanup(self):
        
        try:
            self.unload_lime()
        except AttributeError as ex:
            pass
        self.tunnel.cleanup()
        self.shell.cleanup()
97409
def _clear_context(bin_env=None):
    '''
    
    '''
    contextkey = 'pip.version'
    if bin_env is not None:
        contextkey = '{0}.{1}'.format(contextkey, bin_env)
    __context__.pop(contextkey, None)