Remove an environment from the configuration.
968499
def remove_env(environment):
    
    if not environment:
        print("You need to supply an environment name")
        return

    parser = read_config()

    if not parser.remove_section(environment):
        print("Unknown environment type '%s'" % environment)
        return

    write_config(parser)

    print("Removed environment '%s'" % environment)
381390
def remove(self):
        
        try:
            self.phase = PHASE.REMOVE
            self.logger.info("Removing environment %s..." % self.namespace)
            self.instantiate_features()
            self._specialize()
            for feature in self.features.run_order:
                try:
                    self.run_action(feature, 'sync')
                except FormulaException:
                    # continue trying to remove any remaining features.
                    pass
            self.clear_all()
            self.directory.remove()
            self.injections.commit()
            if self.error_occured:
                self.logger.error(warning_template)
                self.logger.error(REMOVE_WARNING)
        except Exception:
            self.logger.debug("", exc_info=sys.exc_info())
            et, ei, tb = sys.exc_info()
            reraise(et, ei, tb)
243776
def clear(self):
        """"""
        if lib.EnvDeleteActivation(self._env, ffi.NULL) != 1:
            raise CLIPSError(self._env)
215511
def _discard_config(self):
        """"""
        discard_candidate = "copy running-config {}".format(
            self._gen_full_path(self.candidate_cfg)
        )
        discard_merge = "copy null: {}".format(self._gen_full_path(self.merge_cfg))
        self.device.send_command_expect(discard_candidate)
        self.device.send_command_expect(discard_merge)
144135
function remove(oTarget, oListener, oConfiguration) {
		oConfiguration = oConfiguration || getConfiguration(oTarget, oListener);
		updateConfiguration(oTarget, oListener, oConfiguration, true);
	}
307584
def clean_conf_folder(self, locale):
        """"""
        dirname = self.configuration.get_messages_dir(locale)
        dirname.removedirs_p()
610205
@SuppressWarnings("unchecked")
  public final E remove()
  {
    Thread thread = Thread.currentThread();
    ClassLoader loader = thread.getContextClassLoader();

    for (; loader != null; loader = loader.getParent()) {
      if (loader instanceof EnvironmentClassLoader) {
        EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader;

        return (E) envLoader.removeAttribute(_varName);
      }
    }

    return setGlobal(null);
  }
582852
def discard_config(self):
        """"""
        discard_candidate = 'copy running-config {}'.format(self._gen_full_path(self.candidate_cfg))
        discard_merge = 'copy null: {}'.format(self._gen_full_path(self.merge_cfg))
        self._disable_confirm()
        self.device.send_command_expect(discard_candidate)
        self.device.send_command_expect(discard_merge)
        self._enable_confirm()
147152
function _remove(key) {
    var i = _keys.indexOf(key)
    if (i > -1) {
      ls.removeItem(key);
      _keys.splice(_keys.indexOf(key), 1);
      delete _config[key];
    }
  }
528177
def clear_environment(mode = default_env)
    case mode
      when :posix
        ENV.clear
      when :windows
        Puppet::Util::Windows::Process.get_environment_strings.each do |key, _|
          Puppet::Util::Windows::Process.set_environment_variable(key, nil)
        end
      else
        raise _("Unable to clear the environment for mode %{mode}") % { mode: mode }
    end
  end
329232
def remove(self, level, logger):
        
        self.config[level].discard(logger)
        logger.close()
334879
def remove_key(key: str, persists: bool = True):
    

    environ.configs.remove(key, include_persists=persists)
    environ.configs.save()

    environ.log(
        '[REMOVED]: "{}" from configuration settings'.format(key)
    )
492079
def clean(self):
        
        for prop in ('imported_from', 'use', 'plus', 'templates', 'register'):
            try:
                delattr(self, prop)
            except AttributeError:
                pass
        for prop in ('configuration_warnings', 'configuration_errors'):
            try:
                if getattr(self, prop, None) is not None and not getattr(self, prop):
                    delattr(self, prop)
            except AttributeError:
                pass
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
937453
def delete(self, request, bot_id, id, format=None):
        
        return super(EnvironmentVarDetail, self).delete(request, bot_id, id, format)
460754
def _clear_config(self):
        # type: () -> None
        """"""
        for section in self._config.sections():
            self._config.remove_section(section)
1328495
def cli(env, account_id, origin_id):
    """"""

    manager = SoftLayer.CDNManager(env.client)
    manager.remove_origin(account_id, origin_id)