* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights
+ * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
protected static final Logger logger = LoggerFactory.getLogger(JsonUtils.class);
- public static final Gson GSON = new GsonBuilder().setPrettyPrinting()
+ public static final Gson GSON = new GsonBuilder()
+ .registerTypeAdapter(Instant.class, new InstantSerializer())
+ .registerTypeAdapter(Instant.class, new InstantDeserializer())
+ .setPrettyPrinting()
.registerTypeAdapter(SecureServicePermission.class, new SecureServicePermissionDeserializer()).create();
- public static final Gson GSON_JPA_MODEL = new GsonBuilder().setPrettyPrinting()
+ public static final Gson GSON_JPA_MODEL = new GsonBuilder()
.registerTypeAdapter(Instant.class, new InstantSerializer())
.registerTypeAdapter(Instant.class, new InstantDeserializer()).setPrettyPrinting()
+ .setPrettyPrinting()
.excludeFieldsWithoutExposeAnnotation().create();
private JsonUtils() {
{
"currentInstanceCount": 0,
"desiredInstanceCount": 1,
- "pdpInstances": [],
+ "pdpInstances": [
+ {
+ "instanceId": "controlloop-f8287777-5f3e-4f0f-b21b-d8829c93f57b",
+ "pdpState": "ACTIVE",
+ "healthy": "HEALTHY",
+ "message": "Pdp Heartbeat",
+ "lastUpdate": "2021-09-29T02:51:21Z"
+ }
+ ],
"pdpType": "apex",
"policies": [
{
{
"currentInstanceCount": 0,
"desiredInstanceCount": 1,
- "pdpInstances": [],
+ "pdpInstances": [
+ {
+ "instanceId": "drools-f8287777-5f3e-4f0f-b21b-d8829c93f57b",
+ "pdpState": "ACTIVE",
+ "healthy": "HEALTHY",
+ "message": "Pdp Heartbeat",
+ "lastUpdate": "2021-09-29T02:51:21Z"
+ }
+ ],
"pdpType": "drools",
"policies": [
{
{
"currentInstanceCount": 0,
"desiredInstanceCount": 1,
- "pdpInstances": [],
+ "pdpInstances": [
+ {
+ "instanceId": "xacml-f8287777-5f3e-4f0f-b21b-d8829c93f57b",
+ "pdpState": "ACTIVE",
+ "healthy": "HEALTHY",
+ "message": "Pdp Heartbeat",
+ "lastUpdate": "2021-09-29T02:51:21Z"
+ }
+ ],
"pdpType": "xacml",
"policies": [],
"properties": {},
{
"currentInstanceCount": 0,
"desiredInstanceCount": 1,
- "pdpInstances": [],
+ "pdpInstances": [
+ {
+ "instanceId": "monitoring-f8287777-5f3e-4f0f-b21b-d8829c93f57b",
+ "pdpState": "ACTIVE",
+ "healthy": "HEALTHY",
+ "message": "Pdp Heartbeat",
+ "lastUpdate": "2021-09-29T02:51:21Z"
+ }
+ ],
"pdpType": "xacml",
"policies": [
{