def create_vault_of_did(did): service = get_vault_service(did) if service: return free_info = PaymentConfig.get_free_vault_info() setup_vault_service(did, free_info["maxStorage"], free_info["serviceDays"])
def prepare_active_backup_hive_node_db(self): setup_vault_backup_service(self.did, 500, -1) setup_vault_service(self.did, 500, -1) app_id_list = ["appid", "appid2"] param = {"app_id_list": app_id_list} rt, s = self.parse_response( self.test_client.post(INTER_BACKUP_SAVE_URL, data=json.dumps(param), headers=self.auth)) self.assert200(s)
def vault_order_success(info): service = get_vault_service(info[VAULT_ORDER_DID]) if not service: setup_vault_service(info[VAULT_ORDER_DID], info[VAULT_ORDER_PACKAGE_INFO]["maxStorage"], info[VAULT_ORDER_PACKAGE_INFO]["serviceDays"], info[VAULT_ORDER_PACKAGE_INFO]["name"]) else: update_vault_service(info[VAULT_ORDER_DID], info[VAULT_ORDER_PACKAGE_INFO]["maxStorage"], info[VAULT_ORDER_PACKAGE_INFO]["serviceDays"], info[VAULT_ORDER_PACKAGE_INFO]["name"])
def create_free_vault(self): did, app_id, err = pre_proc(self.response) if err: return err service = get_vault_service(did) if service: return self.response.response_ok() free_info = PaymentConfig.get_free_vault_info() setup_vault_service(did, free_info["maxStorage"], free_info["serviceDays"]) return self.response.response_ok()
def setup_test_vault(did): setup_vault_service(did, 100, -1)