mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2024-11-22 23:19:50 +00:00
modify yaml domain info
Signed-off-by: yaoyao <maluyao3@huawei.com>
This commit is contained in:
parent
9d7810c2fc
commit
0b907bfaac
@ -13,9 +13,9 @@
|
||||
|
||||
domain: DEVICE_PROFILE
|
||||
|
||||
DEVICE_PROFILE_SYNC_EVENT:
|
||||
DP_SYNC_EVENT:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, tag: deviceProfileSyn, desc: device profile sync}
|
||||
|
||||
DEVICE_PROFILE_SYNC_FAILED:
|
||||
DP_SYNC_FAILED:
|
||||
__BASE: {type: FAULT, level: CRITICAL, desc: device profile sync failed}
|
||||
FAULT_CODE: {type: INT32, desc: fault code}
|
@ -44,8 +44,8 @@ const std::string TAG = "DeviceProfileStorageManager";
|
||||
|
||||
const std::string SERVICE_TYPE = "type";
|
||||
const std::string SERVICES = "services";
|
||||
const std::string DEVICE_PROFILE_SYNC_FAILED = "DEVICE_PROFILE_SYNC_FAILED";
|
||||
const std::string DEVICE_PROFILE_SYNC_EVENT = "DEVICE_PROFILE_SYNC_EVENT";
|
||||
const std::string DP_SYNC_FAILED = "DP_SYNC_FAILED";
|
||||
const std::string DP_SYNC_EVENT = "DP_SYNC_EVENT";
|
||||
const std::string FAULT_CODE_KEY = "FAULT_CODE";
|
||||
const std::string DP_DEVICE_PUT_TRACE = "DP_DEVICE_PUT";
|
||||
const std::string DP_DEVICE_GET_TRACE = "DP_DEVICE_GET";
|
||||
@ -325,7 +325,7 @@ int32_t DeviceProfileStorageManager::SyncDeviceProfile(const SyncOptions& syncOp
|
||||
StartAsyncTrace(HITRACE_TAG_DEVICE_PROFILE, DP_DEVICE_SYNC_TRACE, FIX_TASK_ID);
|
||||
auto syncTask = [syncOptions, this]() {
|
||||
HILOGI("start sync");
|
||||
ReportBehaviorEvent(DEVICE_PROFILE_SYNC_EVENT);
|
||||
ReportBehaviorEvent(DP_SYNC_EVENT);
|
||||
auto devicesList = syncOptions.GetDeviceList();
|
||||
if (devicesList.empty()) {
|
||||
DpDeviceManager::GetInstance().GetDeviceIdList(devicesList);
|
||||
@ -334,7 +334,7 @@ int32_t DeviceProfileStorageManager::SyncDeviceProfile(const SyncOptions& syncOp
|
||||
std::vector<std::string> devicesVector(std::vector<std::string> { devicesList.begin(), devicesList.end() });
|
||||
int32_t result = onlineSyncTbl_->SyncDeviceProfile(devicesVector, syncOptions.GetSyncMode());
|
||||
if (result != ERR_OK) {
|
||||
ReportFaultEvent(DEVICE_PROFILE_SYNC_FAILED, FAULT_CODE_KEY, result);
|
||||
ReportFaultEvent(DP_SYNC_FAILED, FAULT_CODE_KEY, result);
|
||||
HILOGE("sync failed result : %{public}d", result);
|
||||
NotifySyncCompleted();
|
||||
return;
|
||||
|
@ -39,7 +39,7 @@ namespace {
|
||||
const std::string SERVICE_TYPE = "syscap";
|
||||
const std::string CHARACTER_PRIVATE_SYSCAP = "privatesyscap";
|
||||
const std::string CHARACTER_OS_SYSCAP = "ossyscap";
|
||||
const std::string DEVICE_PROFILE_SYNC_FAILED = "DEVICE_PROFILE_SYNC_FAILED";
|
||||
const std::string DP_SYNC_FAILED = "DP_SYNC_FAILED";
|
||||
const std::string FAULT_CODE_KEY = "FAULT_CODE";
|
||||
const std::string DOMAIN_NAME = std::string(HiSysEvent::Domain::DEVICE_PROFILE);
|
||||
}
|
||||
@ -741,7 +741,7 @@ HWTEST_F(ProfileCrudTest, GetDeviceProfile_002, TestSize.Level3)
|
||||
*/
|
||||
HWTEST_F(ProfileCrudTest, DfxErrorPrint_001, TestSize.Level3)
|
||||
{
|
||||
int ret = HiSysEvent::Write(DOMAIN_NAME, DEVICE_PROFILE_SYNC_FAILED,
|
||||
int ret = HiSysEvent::Write(DOMAIN_NAME, DP_SYNC_FAILED,
|
||||
HiSysEvent::EventType::FAULT, FAULT_CODE_KEY, -1);
|
||||
EXPECT_EQ(0, ret);
|
||||
}
|
||||
|
@ -47,7 +47,6 @@ namespace {
|
||||
const std::string SERVICE_TYPE = "test";
|
||||
const std::string CHARACTER_PRIVATE_SYSCAP = "privatesyscap";
|
||||
const std::string CHARACTER_OS_SYSCAP = "ossyscap";
|
||||
const std::string DEVICE_PROFILE_SYNC_FAILED = "DEVICE_PROFILE_SYNC_FAILED";
|
||||
const std::string FAULT_CODE_KEY = "FAULT_CODE";
|
||||
const std::string DOMAIN_NAME = std::string(HiSysEvent::Domain::DEVICE_PROFILE);
|
||||
const std::string APP_ID = "distributed_device_profile_service";
|
||||
|
Loading…
Reference in New Issue
Block a user