It is preferable to error-out when a Controller doesn't support a method
rather than silently failing.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3751bf4cff97f400ae53e07efb2740e8426992e9
@abc.abstractmethod
def add_context(self, context_type):
# type: (ContextType) -> None
@abc.abstractmethod
def add_context(self, context_type):
# type: (ContextType) -> None
+ raise NotImplementedError
@property
@abc.abstractmethod
def domain(self):
# type: () -> TracingDomain
@property
@abc.abstractmethod
def domain(self):
# type: () -> TracingDomain
+ raise NotImplementedError
@property
@abc.abstractmethod
def name(self):
# type: () -> str
@property
@abc.abstractmethod
def name(self):
# type: () -> str
+ raise NotImplementedError
@abc.abstractmethod
def add_recording_rule(self, rule) -> None:
# type: (Type[EventRule]) -> None
@abc.abstractmethod
def add_recording_rule(self, rule) -> None:
# type: (Type[EventRule]) -> None
+ raise NotImplementedError
class SessionOutputLocation(abc.ABC):
class SessionOutputLocation(abc.ABC):
@abc.abstractmethod
def track(self, pid):
# type: (int) -> None
@abc.abstractmethod
def track(self, pid):
# type: (int) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, pid):
# type: (int) -> None
@abc.abstractmethod
def untrack(self, pid):
# type: (int) -> None
+ raise NotImplementedError
class VirtualProcessIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vpid):
# type: (int) -> None
class VirtualProcessIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vpid):
# type: (int) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, vpid):
# type: (int) -> None
@abc.abstractmethod
def untrack(self, vpid):
# type: (int) -> None
+ raise NotImplementedError
class UserIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, uid):
# type: (Union[int, str]) -> None
class UserIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, uid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, uid):
# type: (Union[int, str]) -> None
@abc.abstractmethod
def untrack(self, uid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
class VirtualUserIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vuid):
# type: (Union[int, str]) -> None
class VirtualUserIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vuid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, vuid):
# type: (Union[int, str]) -> None
@abc.abstractmethod
def untrack(self, vuid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
class GroupIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, gid):
# type: (Union[int, str]) -> None
class GroupIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, gid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, gid):
# type: (Union[int, str]) -> None
@abc.abstractmethod
def untrack(self, gid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
class VirtualGroupIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vgid):
# type: (Union[int, str]) -> None
class VirtualGroupIDProcessAttributeTracker(ProcessAttributeTracker):
@abc.abstractmethod
def track(self, vgid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
@abc.abstractmethod
def untrack(self, vgid):
# type: (Union[int, str]) -> None
@abc.abstractmethod
def untrack(self, vgid):
# type: (Union[int, str]) -> None
+ raise NotImplementedError
@abc.abstractmethod
def name(self):
# type: () -> str
@abc.abstractmethod
def name(self):
# type: () -> str
+ raise NotImplementedError
@property
@abc.abstractmethod
def output(self):
# type: () -> Optional[Type[SessionOutputLocation]]
@property
@abc.abstractmethod
def output(self):
# type: () -> Optional[Type[SessionOutputLocation]]
+ raise NotImplementedError
@abc.abstractmethod
def add_channel(
@abc.abstractmethod
def add_channel(
):
# type: (TracingDomain, Optional[str], BufferSharingPolicy) -> Channel
"""Add a channel with default attributes to the session."""
):
# type: (TracingDomain, Optional[str], BufferSharingPolicy) -> Channel
"""Add a channel with default attributes to the session."""
+ raise NotImplementedError
@abc.abstractmethod
def start(self):
# type: () -> None
@abc.abstractmethod
def start(self):
# type: () -> None
+ raise NotImplementedError
@abc.abstractmethod
def stop(self):
# type: () -> None
@abc.abstractmethod
def stop(self):
# type: () -> None
+ raise NotImplementedError
@abc.abstractmethod
def destroy(self):
# type: () -> None
@abc.abstractmethod
def destroy(self):
# type: () -> None
+ raise NotImplementedError
@abc.abstractmethod
def is_active(self):
# type: () -> bool
@abc.abstractmethod
def is_active(self):
# type: () -> bool
+ raise NotImplementedError
@abc.abstractmethod
def rotate(self):
@abc.abstractmethod
def rotate(self):
Create a session with an output. Don't specify an output
to create a session without an output.
"""
Create a session with an output. Don't specify an output
to create a session without an output.
"""
+ raise NotImplementedError
@abc.abstractmethod
def start_session_by_name(self, name):
@abc.abstractmethod
def start_session_by_name(self, name):
"""
Start a session by name.
"""
"""
Start a session by name.
"""
+ raise NotImplementedError
@abc.abstractmethod
def start_session_by_glob_pattern(self, pattern):
@abc.abstractmethod
def start_session_by_glob_pattern(self, pattern):
"""
Start sessions whose name matches `pattern`, see GLOB(7).
"""
"""
Start sessions whose name matches `pattern`, see GLOB(7).
"""
+ raise NotImplementedError
@abc.abstractmethod
def start_sessions_all(self):
@abc.abstractmethod
def start_sessions_all(self):
Start all sessions visible to the current user.
"""
# type: () -> None
Start all sessions visible to the current user.
"""
# type: () -> None
+ raise NotImplementedError
@abc.abstractmethod
def stop_session_by_name(self, name):
@abc.abstractmethod
def stop_session_by_name(self, name):
"""
Stop a session by name.
"""
"""
Stop a session by name.
"""
+ raise NotImplementedError
@abc.abstractmethod
def stop_session_by_glob_pattern(self, pattern):
@abc.abstractmethod
def stop_session_by_glob_pattern(self, pattern):
"""
Stop sessions whose name matches `pattern`, see GLOB(7).
"""
"""
Stop sessions whose name matches `pattern`, see GLOB(7).
"""
+ raise NotImplementedError
@abc.abstractmethod
def stop_sessions_all(self):
@abc.abstractmethod
def stop_sessions_all(self):
Stop all sessions visible to the current user.
"""
# type: () -> None
Stop all sessions visible to the current user.
"""
# type: () -> None
+ raise NotImplementedError
@abc.abstractmethod
def destroy_session_by_name(self, name):
@abc.abstractmethod
def destroy_session_by_name(self, name):
"""
Destroy a session by name.
"""
"""
Destroy a session by name.
"""
+ raise NotImplementedError
@abc.abstractmethod
def destroy_session_by_glob_pattern(self, pattern):
@abc.abstractmethod
def destroy_session_by_glob_pattern(self, pattern):
"""
Destroy sessions whose name matches `pattern`, see GLOB(7).
"""
"""
Destroy sessions whose name matches `pattern`, see GLOB(7).
"""
+ raise NotImplementedError
@abc.abstractmethod
def destroy_sessions_all(self):
@abc.abstractmethod
def destroy_sessions_all(self):
"""
Destroy all sessions visible to the current user.
"""
"""
Destroy all sessions visible to the current user.
"""
+ raise NotImplementedError
@abc.abstractmethod
def list_sessions(self):
@abc.abstractmethod
def list_sessions(self):
"""
List all sessions visible to the current user.
"""
"""
List all sessions visible to the current user.
"""
+ raise NotImplementedError
@abc.abstractmethod
def rotate_session_by_name(self, name, wait=True):
@abc.abstractmethod
def rotate_session_by_name(self, name, wait=True):