Get a specific group in the Remote by its name .. note:: If groups have not been pulled, they will be pulled upon calling this. .. note:: This function is only available to accounts with admin status on the Remote :param name: Name of Group :return: Group object, if one with that name
(self, name: str)
| 469 | return group.Group(value) |
| 470 | |
| 471 | def get_group_by_name(self, name: str) -> Optional['group.Group']: |
| 472 | """ |
| 473 | Get a specific group in the Remote by its name |
| 474 | |
| 475 | .. note:: If groups have not been pulled, they will be pulled upon calling this. |
| 476 | |
| 477 | .. note:: This function is only available to accounts with admin status on the Remote |
| 478 | |
| 479 | :param name: Name of Group |
| 480 | :return: Group object, if one with that name exists. Else, None |
| 481 | :raises: RuntimeError if there was an error pulling groups |
| 482 | """ |
| 483 | if not self.has_pulled_groups: |
| 484 | self.pull_groups() |
| 485 | |
| 486 | value = core.BNRemoteGetGroupByName(self._handle, name) |
| 487 | if value is None: |
| 488 | return None |
| 489 | return group.Group(value) |
| 490 | |
| 491 | def search_groups(self, prefix: str) -> List[Tuple[int, str]]: |
| 492 | """ |
nothing calls this directly
no test coverage detected