(self, code)
| 122 | self.hmacAuth.updateFleetInfo(orgId, groupId) |
| 123 | |
| 124 | def validateUnblockCode(self, code): |
| 125 | if self.fleetId: |
| 126 | try: |
| 127 | r = requests.post( "%s/astrobox/%s/check-unblock-code" % (self.apiHost, self.boxId), data= {'code': code}, auth=self.hmacAuth ) |
| 128 | if r.status_code == 200: |
| 129 | self.remove_logged_user() |
| 130 | return True |
| 131 | else: |
| 132 | self._logger.error('Unblock request failed with: %s' % r.status_code) |
| 133 | |
| 134 | except Exception as e: |
| 135 | self._logger.exception(e) |
| 136 | |
| 137 | return False |
| 138 | |
| 139 | def cloud_enabled(self): |
| 140 | return roConfig('cloud.apiHost') and self.hmacAuth |
no test coverage detected