diff options
Diffstat (limited to 'ceilometer-model/src')
8 files changed, 43 insertions, 36 deletions
diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java index e9ff2aa..6faafc0 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java @@ -16,7 +16,7 @@ package com.woorea.openstack.ceilometer.v2.model; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Meter { diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java index bb8e991..193ce29 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java @@ -18,7 +18,7 @@ package com.woorea.openstack.ceilometer.v2.model; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Resource { //{"resource_id": "23b55841eedd41e99d5f3f32149ca086", "timestamp": "2013-03-03T15:19:00", "project_id": "23b55841eedd41e99d5f3f32149ca086", "user_id": null, "metadata": {}} diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java index 722b1a9..2808113 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java @@ -18,7 +18,7 @@ package com.woorea.openstack.ceilometer.v2.model; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Sample { diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java index c741abc..747c9f0 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java @@ -18,7 +18,7 @@ package com.woorea.openstack.ceilometer.v2.model; import java.math.BigDecimal; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Statistics { diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java index 97bb2af..361bf9c 100644 --- a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.ceilometer.v2.model; -import com.woorea.openstack.ceilometer.v2.model.Meter; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -44,9 +44,10 @@ public class MeterTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java index 10b361e..08cbcd5 100644 --- a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.ceilometer.v2.model; -import com.woorea.openstack.ceilometer.v2.model.Resource; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + import java.util.Map; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -47,9 +48,10 @@ public class ResourceTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java index fa8325e..e647f42 100644 --- a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.ceilometer.v2.model; -import com.woorea.openstack.ceilometer.v2.model.Sample; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + import java.util.Map; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -53,9 +54,10 @@ public class SampleTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java index d3e7597..741e53b 100644 --- a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.ceilometer.v2.model; -import com.woorea.openstack.ceilometer.v2.model.Statistics; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + import java.math.BigDecimal; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -50,9 +51,10 @@ public class StatisticsTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { |