Returns the execution profile associated with the provided ``name``. :param name: The name (or key) of the execution profile.
(self, name)
| 3075 | continuous_paging_state=continuous_paging_state, host=host) |
| 3076 | |
| 3077 | def get_execution_profile(self, name): |
| 3078 | """ |
| 3079 | Returns the execution profile associated with the provided ``name``. |
| 3080 | |
| 3081 | :param name: The name (or key) of the execution profile. |
| 3082 | """ |
| 3083 | profiles = self.cluster.profile_manager.profiles |
| 3084 | try: |
| 3085 | return profiles[name] |
| 3086 | except KeyError: |
| 3087 | eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] |
| 3088 | raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( |
| 3089 | _execution_profile_to_string(name), ', '.join(eps))) |
| 3090 | |
| 3091 | def _maybe_get_execution_profile(self, ep): |
| 3092 | return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) |