Replaces existing configuration with the given dictionary. If config_option_dict is an empty dictionary, simply clear current client configuration.
(self, config_option_dict)
| 167 | pass |
| 168 | |
| 169 | def set_configuration(self, config_option_dict): |
| 170 | """Replaces existing configuration with the given dictionary. |
| 171 | If config_option_dict is an empty dictionary, simply clear current client |
| 172 | configuration.""" |
| 173 | assert isinstance(config_option_dict, dict), \ |
| 174 | "config_option_dict must be a dictionary" |
| 175 | self.clear_configuration() |
| 176 | if not config_option_dict: |
| 177 | return |
| 178 | log_lines = list() |
| 179 | for name, value in config_option_dict.items(): |
| 180 | if self.set_configuration_option(name, value, False): |
| 181 | log_lines.append("set {0}={1};".format(name, value)) |
| 182 | if log_lines: |
| 183 | self.log_client("set_configuration:\n\n{}\n".format('\n'.join(log_lines))) |
| 184 | |
| 185 | @abc.abstractmethod |
| 186 | def clear_configuration(self): |