(self, params: KeeperParams)
| 101 | |
| 102 | class PedmPlugin(IPedmAdmin): |
| 103 | def __init__(self, params: KeeperParams): |
| 104 | self.params = params |
| 105 | if params.enterprise is None: |
| 106 | raise Exception("Not an enterprise admin") |
| 107 | self._enterprise_id = params.enterprise_id |
| 108 | self.enterprise_uid: str = utils.base64_url_encode(self._enterprise_id.to_bytes(16, byteorder='big')) |
| 109 | self.storage: admin_storage.IPedmStorage = admin_storage.SqlitePedmStorage(params.get_connection, self._enterprise_id) |
| 110 | |
| 111 | self.device_uid = utils.generate_uid() |
| 112 | self._populate_data = True |
| 113 | self._agent_key: Optional[bytes] = None |
| 114 | self._all_agents: Optional[bytes] = None |
| 115 | |
| 116 | self._deployments = in_memory.InMemoryEntityStorage[admin_types.PedmDeployment, str]() |
| 117 | self._agents = in_memory.InMemoryEntityStorage[admin_types.PedmAgent, str]() |
| 118 | self._deployment_agents = in_memory.InMemoryLinkStorage[admin_types.PedmDeploymentAgent, str, str]() |
| 119 | self._policies = in_memory.InMemoryEntityStorage[admin_types.PedmPolicy, str]() |
| 120 | self._collections = in_memory.InMemoryEntityStorage[admin_types.PedmCollection, str]() |
| 121 | self._approvals = in_memory.InMemoryEntityStorage[admin_types.PedmApproval, str]() |
| 122 | |
| 123 | # self._push_notifications = PedmAdminNotifications(on_message=self.on_push_message) |
| 124 | # self.connect_pushes() |
| 125 | self._need_sync = True |
| 126 | self.logger = logging.getLogger("keeper.pedm") |
| 127 | |
| 128 | """ |
| 129 | def connect_pushes(self): |
nothing calls this directly
no outgoing calls
no test coverage detected