**VOLATILE** This API is subject to change at any time. Register a :class:`~couchbase.options.ConfigProfile`. Args: profile_name (str): The name of the :class:`~couchbase.options.ConfigProfile` to register. profile (:class:`~couchbase.options.Confi
(self,
profile_name, # type: str
profile, # type: ConfigProfile
)
| 275 | self._profiles[profile_name].apply(options) |
| 276 | |
| 277 | def register_profile(self, |
| 278 | profile_name, # type: str |
| 279 | profile, # type: ConfigProfile |
| 280 | ) -> None: |
| 281 | """ |
| 282 | **VOLATILE** This API is subject to change at any time. |
| 283 | |
| 284 | Register a :class:`~couchbase.options.ConfigProfile`. |
| 285 | |
| 286 | Args: |
| 287 | profile_name (str): The name of the :class:`~couchbase.options.ConfigProfile` to register. |
| 288 | profile (:class:`~couchbase.options.ConfigProfile`): The :class:`~couchbase.options.ConfigProfile` |
| 289 | to register. |
| 290 | |
| 291 | Raises: |
| 292 | :class:`~couchbase.exceptions.InvalidArgumentException`: If the specified profile is not derived |
| 293 | from :class:`~couchbase.options.ConfigProfile`. |
| 294 | |
| 295 | """ |
| 296 | if not issubclass(profile.__class__, ConfigProfile): |
| 297 | raise InvalidArgumentException('A Configuration Profile must be derived from ConfigProfile') |
| 298 | |
| 299 | self._profiles[profile_name] = profile |
| 300 | |
| 301 | def unregister_profile(self, |
| 302 | profile_name # type: str |