diff options
author | Rob Daugherty <rd472p@att.com> | 2018-09-11 11:39:12 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-09-11 11:42:19 -0400 |
commit | 69135296d0c23ad73efb813e56da65cf309c5986 (patch) | |
tree | b29823f2c0b978327d892e87c844dcd2d28acc72 /nova-model | |
parent | 7f05d1c3f153e89fa78c2bb97b950e42f6b30b38 (diff) |
Use fasterxml jackson implementation in so/libs
NexusIQ issue: org.codehaus.jackson
This commit changes so/libs from the old codehaus jackson
implementation to the fasterxml implementation.
2.8.10 is the latest version compatible with the 1.5.13.RELEASE
springboot version used in SO.
Change-Id: I3b1167dd0efeb3463efb7e01fac26d0f312d7aad
Issue-ID: SO-864
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'nova-model')
138 files changed, 1024 insertions, 899 deletions
diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java index 31811f5..5ff1a2b 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java @@ -16,8 +16,8 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("certificate") public class Certificate { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java index dc0f21d..205816f 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java @@ -19,7 +19,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.Calendar; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("cloudpipe") public class Cloudpipe implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java index a9920d6..09e02e0 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java @@ -19,7 +19,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Cloudpipes implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java index bdf37c2..89b1121 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Calendar; import java.util.List; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("extension") public class Extension implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java index 0ecb493..ce13b14 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Extensions implements Iterable<Extension>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java index 817c50f..00740f4 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java @@ -19,8 +19,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("flavor") public class Flavor implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java index 481e3bf..5677cb3 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java @@ -19,8 +19,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("flavor") public class FlavorForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java index 0bc4ae8..95decf4 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Flavors implements Iterable<Flavor>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java index b38e78e..990b980 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("floating_ip") public class FloatingIp implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java index 2a5eb75..5f134c2 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("floating-ip-pool") public class FloatingIpDomain implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java index bf849f3..45c7f6e 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class FloatingIpDomains implements Iterable<FloatingIpDomain>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java index b3196b6..451bd03 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java @@ -20,8 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.nova.model.FloatingIpPools.FloatingIpPool; public class FloatingIpPools implements Iterable<FloatingIpPool>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java index 5c05794..58eb173 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class FloatingIps implements Iterable<FloatingIp>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java index f193e2d..c41eb65 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java @@ -19,7 +19,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Host implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java index 4ba26e7..d08c7f0 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java @@ -20,8 +20,8 @@ import java.io.Serializable; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("aggregate") public class HostAggregate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java index 56da094..fd83d16 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class HostAggregates implements Iterable<HostAggregate>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java index b97a7ae..1cdf0ae 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Hosts implements Iterable<Hosts.Host>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java index 2a03f6f..e29f961 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java @@ -21,8 +21,8 @@ import java.util.Calendar; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("image") public class Image implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java index 1e34a43..9191fa3 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("os-volume_upload_image") public class ImageFromVolume implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java index e19892d..2d2ec5d 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Images implements Iterable<Image>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java index b7bd148..fb1a1e1 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("keypair") public class KeyPair implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java index b36a91e..2095a73 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class KeyPairs implements Iterable<KeyPair>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java index d9a949e..fd1d113 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java @@ -20,8 +20,8 @@ import java.io.Serializable; import java.util.Calendar; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("limits") public class Limits implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java index 2b8ac85..67bfba6 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("network") public class Network implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java index ea9f23e..0524006 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java @@ -16,8 +16,7 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; public class NetworkForCreate { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java index 7dac2c6..3f86d4f 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Networks implements Iterable<Network>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java index 52bc930..d03bea0 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java @@ -16,8 +16,8 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("quota_set") public class QuotaSet { @@ -169,4 +169,4 @@ public class QuotaSet { public void setInjectedFilePathBytes(Integer injectedFilePathBytes) { this.injectedFilePathBytes = injectedFilePathBytes; } -}
\ No newline at end of file +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java index a57fd69..de1ac85 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java @@ -19,8 +19,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("security_group") public class SecurityGroup implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java index 2a40173..ca4ebbe 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java @@ -18,7 +18,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("security_group") public class SecurityGroupForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java index 8911156..6ddba5f 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java @@ -20,9 +20,9 @@ import java.io.Serializable; import javax.xml.bind.annotation.XmlElement; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("security_group_rule") public class SecurityGroupRuleForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java index 4d3ebbb..705432b 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class SecurityGroups implements Iterable<SecurityGroup>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java index 63acbc2..4dd6dfa 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java @@ -22,10 +22,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonAnySetter; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("server") public class Server implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java index c0289be..76acc20 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java @@ -22,8 +22,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; public interface ServerAction extends Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java index 4858e01..f5fe889 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java @@ -22,8 +22,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("server") public class ServerForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java index 92643b9..772c1fb 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Servers implements Iterable<Server>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java index ea6f77e..bed84dc 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java @@ -20,8 +20,8 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("tenant_usage") public class SimpleTenantUsage implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java index 313e5eb..20db05e 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class SimpleTenantUsages implements Iterable<SimpleTenantUsage>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java index c51ab62..9216854 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("snapshot") public class Snapshot implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java index 752eb59..5fcd76e 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("snapshot") public class SnapshotForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java index 238a173..060ca48 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Snapshots implements Iterable<Snapshot>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java index 453bf24..841d5b5 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java @@ -20,8 +20,8 @@ import java.io.Serializable; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volume") public class Volume implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java index 3a62cca..76b0d31 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java @@ -18,7 +18,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volumeAttachment") public class VolumeAttachment implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java index 2a5ecba..7c8355c 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class VolumeAttachments implements Iterable<VolumeAttachment>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java index c06d692..49feab7 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java @@ -19,8 +19,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volume") public class VolumeForCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java index f368f5c..95abf39 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java @@ -18,8 +18,8 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("os-volume_upload_image") public class VolumeForImageCreate implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java index 59717d4..28390d3 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java @@ -18,7 +18,7 @@ package com.woorea.openstack.nova.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volume-type") public class VolumeType implements Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java index 96fc6c5..351a92a 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class VolumeTypes implements Iterable<VolumeType>, Serializable { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java index 1dc5bde..4266e63 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Volumes implements Iterable<Volume>, Serializable { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/AbsoluteLimitTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/AbsoluteLimitTest.java index 2fabb2b..d24531b 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/AbsoluteLimitTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/AbsoluteLimitTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Limits.AbsoluteLimit; -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; @@ -64,9 +65,10 @@ public class AbsoluteLimitTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressTest.java index 45e1f1d..3d34523 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Server.Addresses.Address; -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; @@ -42,9 +43,10 @@ public class AddressTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressesTest.java index 8449f83..132537d 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/AddressesTest.java @@ -20,14 +20,16 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Server.Addresses; import com.woorea.openstack.nova.model.Server.Addresses.Address; + import java.util.List; 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; @@ -65,9 +67,10 @@ public class AddressesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/AssociateFloatingIpTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/AssociateFloatingIpTest.java index a242728..b93912b 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/AssociateFloatingIpTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/AssociateFloatingIpTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp; -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; @@ -41,11 +42,12 @@ public class AssociateFloatingIpTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/CertificateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/CertificateTest.java index 24ca40c..bb5dd4d 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/CertificateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/CertificateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Certificate; -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; @@ -42,11 +42,12 @@ public class CertificateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ChangePasswordTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ChangePasswordTest.java index 35a3c8d..a52c99e 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ChangePasswordTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ChangePasswordTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.ChangePassword; -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; @@ -41,11 +42,12 @@ public class ChangePasswordTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipeTest.java index b59703c..7552f13 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipeTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Cloudpipe; +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.Calendar; -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; @@ -48,11 +49,12 @@ public class CloudpipeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipesTest.java index b7e0b01..491b005 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/CloudpipesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Cloudpipe; -import com.woorea.openstack.nova.model.Cloudpipes; +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.List; -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; @@ -57,9 +57,10 @@ public class CloudpipesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/ConfirmResizeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ConfirmResizeTest.java index c5710a9..f311074 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ConfirmResizeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ConfirmResizeTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.ConfirmResize; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class ConfirmResizeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ConsoleOutputTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ConsoleOutputTest.java index 85385d8..240e11e 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ConsoleOutputTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ConsoleOutputTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.ConsoleOutput; -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; @@ -39,9 +40,10 @@ public class ConsoleOutputTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateBackupTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateBackupTest.java index 84b0622..271cc69 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateBackupTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateBackupTest.java @@ -20,12 +20,14 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.CreateBackup; + 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; @@ -48,11 +50,12 @@ public class CreateBackupTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateImageTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateImageTest.java index cd0603d..2c33b27 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateImageTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/CreateImageTest.java @@ -20,12 +20,14 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.CreateImage; + 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; @@ -46,11 +48,12 @@ public class CreateImageTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/DisassociateFloatingIpTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/DisassociateFloatingIpTest.java index c58daa1..502e943 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/DisassociateFloatingIpTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/DisassociateFloatingIpTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp; -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; @@ -41,11 +42,12 @@ public class DisassociateFloatingIpTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionTest.java index 2047d22..514ea22 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionTest.java @@ -20,14 +20,14 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Extension; -import com.woorea.openstack.nova.model.Link; +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.Calendar; import java.util.List; -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; @@ -57,11 +57,12 @@ public class ExtensionTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionsTest.java index 56bdf9c..6fe182d 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ExtensionsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Extension; -import com.woorea.openstack.nova.model.Extensions; +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.List; -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; @@ -71,9 +71,10 @@ public class ExtensionsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FaultTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FaultTest.java index d4d58fb..a426d8a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FaultTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FaultTest.java @@ -20,12 +20,14 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Server.Fault; + import java.util.Calendar; -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; @@ -43,9 +45,10 @@ public class FaultTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorForCreateTest.java index 578f55a..2d6e1a7 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorForCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FlavorForCreate; -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; @@ -48,11 +48,12 @@ public class FlavorForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorTest.java index d3a369f..63fa405 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Flavor; -import com.woorea.openstack.nova.model.Link; +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.List; -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; @@ -64,11 +64,12 @@ public class FlavorTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorsTest.java index 326b11e..5316006 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FlavorsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Flavor; -import com.woorea.openstack.nova.model.Flavors; +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.List; -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; @@ -87,9 +87,10 @@ public class FlavorsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainTest.java index 02fd66c..dac8a45 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FloatingIpDomain; -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,11 +44,12 @@ public class FloatingIpDomainTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainsTest.java index 6cc5108..6cfe54f 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpDomainsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FloatingIpDomain; -import com.woorea.openstack.nova.model.FloatingIpDomains; +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.List; -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; @@ -51,9 +51,10 @@ public class FloatingIpDomainsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolTest.java index d8dd6c2..7048b63 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.FloatingIpPools.FloatingIpPool; -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; @@ -39,9 +40,10 @@ public class FloatingIpPoolTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolsTest.java index d4dcfd6..7f5c1c1 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpPoolsTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FloatingIpPools; +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 com.woorea.openstack.nova.model.FloatingIpPools.FloatingIpPool; + import java.util.List; -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; @@ -45,9 +46,10 @@ public class FloatingIpPoolsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpTest.java index f184e83..00d382c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FloatingIp; -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; @@ -45,11 +45,12 @@ public class FloatingIpTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpsTest.java index 9cfd3ec..4b279df 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/FloatingIpsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.FloatingIp; -import com.woorea.openstack.nova.model.FloatingIps; +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.List; -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 +53,10 @@ public class FloatingIpsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/ForceDeleteTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ForceDeleteTest.java index 87a904c..bf26778 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ForceDeleteTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ForceDeleteTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.ForceDelete; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class ForceDeleteTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/GetConsoleOutputTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/GetConsoleOutputTest.java index 6293712..8f2ea1e 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/GetConsoleOutputTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/GetConsoleOutputTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.GetConsoleOutput; -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; @@ -41,11 +42,12 @@ public class GetConsoleOutputTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/GetVncConsoleTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/GetVncConsoleTest.java index 0de38d7..d7ed6c9 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/GetVncConsoleTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/GetVncConsoleTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.GetVncConsole; -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; @@ -41,11 +42,12 @@ public class GetVncConsoleTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/GroupTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/GroupTest.java index 3cb1144..561ea9a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/GroupTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/GroupTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.SecurityGroup.Rule.Group; -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; @@ -40,9 +41,10 @@ public class GroupTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregateTest.java index f694e44..5631245 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregateTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.HostAggregate; +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.List; 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; @@ -54,11 +55,12 @@ public class HostAggregateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregatesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregatesTest.java index 8e97938..6fba9c2 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregatesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostAggregatesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.HostAggregate; -import com.woorea.openstack.nova.model.HostAggregates; +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.List; -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; @@ -67,9 +67,10 @@ public class HostAggregatesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/HostTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostTest.java index 424a265..99d747c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/HostTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Hosts.Host; -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; @@ -41,9 +42,10 @@ public class HostTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/HostsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostsTest.java index ae0c6d8..ad60a69 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/HostsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/HostsTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Hosts; +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 com.woorea.openstack.nova.model.Hosts.Host; + import java.util.List; -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; @@ -49,9 +50,10 @@ public class HostsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageFromVolumeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageFromVolumeTest.java index 2c4b6c4..4983a55 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageFromVolumeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageFromVolumeTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.ImageFromVolume; -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; @@ -50,11 +50,12 @@ public class ImageFromVolumeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageTest.java index 4fa6869..4fce1d4 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImageTest.java @@ -20,16 +20,16 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Image; +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 com.woorea.openstack.nova.model.Image.Server; -import com.woorea.openstack.nova.model.Link; + import java.util.Calendar; import java.util.List; 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; @@ -79,11 +79,12 @@ public class ImageTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ImagesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImagesTest.java index bd92fb2..2b52804 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ImagesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ImagesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Image; -import com.woorea.openstack.nova.model.Images; +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.List; -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; @@ -111,9 +111,10 @@ public class ImagesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/IpRangeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/IpRangeTest.java index 2db77e5..0505671 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/IpRangeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/IpRangeTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.SecurityGroup.Rule.IpRange; -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; @@ -39,9 +40,10 @@ public class IpRangeTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairTest.java index 39a159e..c7f564c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.KeyPair; -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; @@ -45,11 +45,12 @@ public class KeyPairTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairWrapperTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairWrapperTest.java index b71cc09..3ba27d0 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairWrapperTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairWrapperTest.java @@ -20,13 +20,12 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.KeyPair; +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 com.woorea.openstack.nova.model.KeyPairs.KeyPairWrapper; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -46,9 +45,10 @@ public class KeyPairWrapperTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairsTest.java index 4eb25a8..fe6d090 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/KeyPairsTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.KeyPairs; +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.List; -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.Ignore; import org.junit.Test; @@ -57,9 +58,10 @@ public class KeyPairsTest { + "}"; 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); // This is test is ignored because The KeyPairs class does not // serialize into JSON correctly. It is probably not an operational diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitEntryTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitEntryTest.java index 2396827..25f6ab9 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitEntryTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitEntryTest.java @@ -20,12 +20,14 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Limits.RateLimit.LimitEntry; + import java.util.Calendar; -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; @@ -45,9 +47,10 @@ public class LimitEntryTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitsTest.java index 2977a3a..ec450d3 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/LimitsTest.java @@ -20,14 +20,15 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Limits; +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 com.woorea.openstack.nova.model.Limits.AbsoluteLimit; import com.woorea.openstack.nova.model.Limits.RateLimit; + import java.util.List; -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; @@ -108,11 +109,12 @@ public class LimitsTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/LinkTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/LinkTest.java index 81b91a8..c2fae01 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/LinkTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/LinkTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Link; -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; @@ -41,9 +41,10 @@ public class LinkTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/LockTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/LockTest.java index aca120e..1c017de 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/LockTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/LockTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Lock; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class LockTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkForCreateTest.java index e5b379b..aae0c7f 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkForCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.NetworkForCreate; -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; @@ -40,9 +40,10 @@ public class NetworkForCreateTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkTest.java index ef4a683..73b871d 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworkTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Network; -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; @@ -68,11 +68,12 @@ public class NetworkTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworksTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworksTest.java index 9268445..3e4272c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworksTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/NetworksTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Network; -import com.woorea.openstack.nova.model.Networks; +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.List; -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; @@ -99,9 +99,10 @@ public class NetworksTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/PauseTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/PauseTest.java index a5ec89d..c14cc40 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/PauseTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/PauseTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Pause; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class PauseTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/PersonalityFileTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/PersonalityFileTest.java index 81cc6ac..6e113cb 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/PersonalityFileTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/PersonalityFileTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.PersonalityFile; -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; @@ -40,9 +40,10 @@ public class PersonalityFileTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/QuotaSetTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/QuotaSetTest.java index 0a424ed..c26a3a1 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/QuotaSetTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/QuotaSetTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.QuotaSet; -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; @@ -54,11 +54,12 @@ public class QuotaSetTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/RateLimitTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RateLimitTest.java index 24553a5..ef2e98a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RateLimitTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RateLimitTest.java @@ -20,13 +20,15 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Limits.RateLimit; import com.woorea.openstack.nova.model.Limits.RateLimit.LimitEntry; + import java.util.List; -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; @@ -57,9 +59,10 @@ public class RateLimitTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/RebootTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RebootTest.java index 1a9ea77..494b088 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RebootTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RebootTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Reboot; -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; @@ -41,11 +42,12 @@ public class RebootTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/RebuildTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RebuildTest.java index 1fb9e86..b3fb845 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RebuildTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RebuildTest.java @@ -20,14 +20,15 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.PersonalityFile; +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 com.woorea.openstack.nova.model.ServerAction.Rebuild; + import java.util.List; 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; @@ -60,11 +61,12 @@ public class RebuildTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueResponseTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueResponseTest.java index 519e2a3..3cbee04 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueResponseTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueResponseTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.RescueResponse; -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; @@ -39,9 +40,10 @@ public class RescueResponseTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueTest.java index ea14bd2..6c68207 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RescueTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Rescue; -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; @@ -41,11 +42,12 @@ public class RescueTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResizeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResizeTest.java index 05aafd1..520b9fb 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResizeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResizeTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Resize; -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; @@ -42,11 +43,12 @@ public class ResizeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceTest.java index b075071..e48cb62 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Host.ResourceWrapper.Resource; -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; @@ -43,9 +44,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/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceWrapperTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceWrapperTest.java index b9ab596..3616551 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceWrapperTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResourceWrapperTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.Host.ResourceWrapper; import com.woorea.openstack.nova.model.Host.ResourceWrapper.Resource; -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; @@ -46,9 +47,10 @@ public class ResourceWrapperTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/RestoreTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RestoreTest.java index 1b78aac..c601a3f 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RestoreTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RestoreTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Restore; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class RestoreTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResumeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResumeTest.java index e8b1ff3..db84968 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ResumeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ResumeTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Resume; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class ResumeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/RevertResizeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RevertResizeTest.java index b3d6d36..9aca582 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RevertResizeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RevertResizeTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.RevertResize; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class RevertResizeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/RuleTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/RuleTest.java index 0ec78dc..65ecb6c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/RuleTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/RuleTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.SecurityGroup.Rule; import com.woorea.openstack.nova.model.SecurityGroup.Rule.Group; import com.woorea.openstack.nova.model.SecurityGroup.Rule.IpRange; -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; @@ -55,11 +56,12 @@ public class RuleTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupForCreateTest.java index 71460b4..0c995d1 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupForCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SecurityGroupForCreate; -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; @@ -42,11 +42,12 @@ public class SecurityGroupForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreateTest.java index ae1dbac..fc5cf69 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SecurityGroupRuleForCreate; -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; @@ -46,11 +46,12 @@ public class SecurityGroupRuleForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupTest.java index 5bcc32a..b68e503 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerForCreate.SecurityGroup; -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; @@ -39,9 +40,10 @@ public class SecurityGroupTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupsTest.java index f3446f2..2ee2faa 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SecurityGroupsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SecurityGroup; -import com.woorea.openstack.nova.model.SecurityGroups; +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.List; -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; @@ -127,9 +127,10 @@ public class SecurityGroupsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerForCreateTest.java index 2653f02..7b5d165 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerForCreateTest.java @@ -20,16 +20,15 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.NetworkForCreate; -import com.woorea.openstack.nova.model.PersonalityFile; -import com.woorea.openstack.nova.model.ServerForCreate; +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 com.woorea.openstack.nova.model.ServerForCreate.SecurityGroup; + import java.util.List; 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; @@ -81,11 +80,12 @@ public class ServerForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java index 3aa4833..27ba42d 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerTest.java @@ -20,19 +20,16 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Flavor; -import com.woorea.openstack.nova.model.Image; -import com.woorea.openstack.nova.model.Link; -import com.woorea.openstack.nova.model.SecurityGroup; -import com.woorea.openstack.nova.model.Server; +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 com.woorea.openstack.nova.model.Server.Addresses; import com.woorea.openstack.nova.model.Server.Fault; + import java.util.List; 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; @@ -266,11 +263,12 @@ public class ServerTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerUsageTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerUsageTest.java index 4b7f683..cfec1f7 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerUsageTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServerUsageTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.SimpleTenantUsage.ServerUsage; -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 ServerUsageTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java index 7f45acc..ecd5394 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/ServersTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Server; -import com.woorea.openstack.nova.model.Servers; +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.List; -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; @@ -487,9 +487,10 @@ public class ServersTest { } 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/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsageTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsageTest.java index 8303e33..da2208f 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsageTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsageTest.java @@ -20,14 +20,15 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SimpleTenantUsage; +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 com.woorea.openstack.nova.model.SimpleTenantUsage.ServerUsage; + import java.math.BigDecimal; import java.util.List; -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; @@ -77,11 +78,12 @@ public class SimpleTenantUsageTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsagesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsagesTest.java index 523a9ab..ee4598c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsagesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SimpleTenantUsagesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SimpleTenantUsage; -import com.woorea.openstack.nova.model.SimpleTenantUsages; +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.List; -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; @@ -111,9 +111,10 @@ public class SimpleTenantUsagesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotForCreateTest.java index edcca0f..e894375 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotForCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.SnapshotForCreate; -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,11 +44,12 @@ public class SnapshotForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotTest.java index d62f730..23e152c 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Snapshot; -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; @@ -47,11 +47,12 @@ public class SnapshotTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotsTest.java index 9bf525b..c4e56b5 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SnapshotsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Snapshot; -import com.woorea.openstack.nova.model.Snapshots; +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.List; -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; @@ -57,9 +57,10 @@ public class SnapshotsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/StartTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/StartTest.java index c96b74a..3b433a4 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/StartTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/StartTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Start; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class StartTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/StopTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/StopTest.java index 2abb35e..b9989b8 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/StopTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/StopTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Stop; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class StopTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/SuspendTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/SuspendTest.java index bcbb0da..b885ffe 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/SuspendTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/SuspendTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Suspend; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class SuspendTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnlockTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnlockTest.java index 43ad515..e6f8a05 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnlockTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnlockTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Unlock; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class UnlockTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnpauseTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnpauseTest.java index f180b96..924eb2a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnpauseTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnpauseTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Unpause; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class UnpauseTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnrescueTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnrescueTest.java index 6e92807..2945ee5 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/UnrescueTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/UnrescueTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.Unrescue; -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; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +39,12 @@ public class UnrescueTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VncConsoleTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VncConsoleTest.java index 8582bca..36cf35a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VncConsoleTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VncConsoleTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.nova.model; +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 com.woorea.openstack.nova.model.ServerAction.VncConsole; -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; @@ -42,11 +43,12 @@ public class VncConsoleTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentTest.java index c51efe7..b051d52 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeAttachment; -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,11 +44,12 @@ public class VolumeAttachmentTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentsTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentsTest.java index b84389b..f409aa2 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentsTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeAttachmentsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeAttachment; -import com.woorea.openstack.nova.model.VolumeAttachments; +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.List; -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; @@ -51,9 +51,10 @@ public class VolumeAttachmentsTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForCreateTest.java index 5caf86d..7654cef 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForCreateTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeForCreate; +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; @@ -50,11 +51,12 @@ public class VolumeForCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForImageCreateTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForImageCreateTest.java index eae93e5..98a3e1a 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForImageCreateTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeForImageCreateTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeForImageCreate; -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; @@ -46,11 +46,12 @@ public class VolumeForImageCreateTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTest.java index 7a8d058..bf1a7e1 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Volume; +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.List; 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; @@ -62,11 +63,12 @@ public class VolumeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypeTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypeTest.java index b485dbb..9033b9e 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypeTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypeTest.java @@ -20,12 +20,11 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeType; -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 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.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.skyscreamer.jsonassert.JSONCompareMode; @@ -39,11 +38,12 @@ public class VolumeTypeTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java index 903b67d..73f84b2 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.VolumeType; -import com.woorea.openstack.nova.model.VolumeTypes; +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.List; -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; @@ -41,9 +41,10 @@ public class VolumeTypesTest { + "}"; 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/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumesTest.java index 4c2d5b1..6729cc4 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.nova.model; -import com.woorea.openstack.nova.model.Volume; -import com.woorea.openstack.nova.model.Volumes; +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.List; -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; @@ -83,9 +83,10 @@ public class VolumesTest { + "}"; 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 { |