diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-01-24 17:06:39 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-01-24 17:13:01 -0500 |
commit | 7ab8e99936aa0dd72c8b0f54620bbfef8d7ec455 (patch) | |
tree | 7018cb258315e327f4817a7f01abe344426f4426 /adapters/mso-adapters-rest-interface | |
parent | 147e9ee814448c8bbec4aa3aeac4b7118b7c1bc7 (diff) |
bugfixes jan 24th
Fix null pointer exception when no requestParameters are specified
Add configurable timer in ActivateVfModuleBB to delay call to SDNC
activate - Use raw slf4j logger - use {} formatting
Add configurable timer in ActivateVfModuleBB to delay call to SDNC
activate - Use raw slf4j logger
Add configurable timer in ActivateVfModuleBB to delay call to SDNC
activate - removed unused references in test class
Add configurable timer in ActivateVfModuleBB to delay call to SDNC
activate
Update PortGroup objects separately from the parent VCE object -
restore setVariable calls back into vce object - they might be needed
later.
Update PortGroup objects separately from the parent VCE object -
updated test class
extra call to get PortGroups
Update PortGroup objects separately from the parent VCE object - use
PortGroup.getInterfaceRole() getter method instead of accessing field
directly.
Update PortGroup objects separately from the parent VCE object
Added back required headers for tenant isolation.
removed workflow exception from outmapping in execute
Fix possible null ptr exception, fix to add braces.
Default networkTechnology in Update as done in Create
Fix failing junits, mapper force upper case nwtech
update exception builder to properly throw exception error message
supporting assign service instance a la carte as well
adding in proper exception handling in network rest v1
add the unassign action to R macro data file
Change-Id: Ide420514f81b8083b4c76c762c064de199624cf7
Issue-ID: SO-1424
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-adapters-rest-interface')
3 files changed, 7 insertions, 29 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java index 3e4d18cb1b..153ee78cb0 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java @@ -54,7 +54,7 @@ public class CreateNetworkRequest extends NetworkRequestCommon { private String networkType; private String networkTypeVersion; private String modelCustomizationUuid; - private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON; + private String networkTechnology = "NEUTRON"; private List<Subnet> subnets; private ProviderVlanNetwork providerVlanNetwork; private ContrailNetwork contrailNetwork; @@ -62,7 +62,6 @@ public class CreateNetworkRequest extends NetworkRequestCommon { private Boolean backout = true; private Map<String,String> networkParams = new HashMap<>(); private MsoRequest msoRequest = new MsoRequest(); - @JsonProperty private boolean contrailRequest; public CreateNetworkRequest() { @@ -125,13 +124,12 @@ public class CreateNetworkRequest extends NetworkRequestCommon { this.networkTypeVersion = networkTypeVersion; } - public NetworkTechnology getNetworkTechnology() { + public String getNetworkTechnology() { return networkTechnology; } - public void setNetworkTechnology(NetworkTechnology networkTechnology) { + public void setNetworkTechnology(String networkTechnology) { this.networkTechnology = networkTechnology; - this.contrailRequest = determineContrail(); } public List<Subnet> getSubnets() { @@ -156,7 +154,6 @@ public class CreateNetworkRequest extends NetworkRequestCommon { public void setContrailNetwork(ContrailNetwork contrailNetwork) { this.contrailNetwork = contrailNetwork; - this.contrailRequest = determineContrail(); } public Boolean getFailIfExists() { @@ -195,12 +192,8 @@ public class CreateNetworkRequest extends NetworkRequestCommon { return this.contrailRequest; } - @JsonIgnore - protected void setContrailRequest(boolean contrailRequest) { + public void setContrailRequest(boolean contrailRequest) { this.contrailRequest = contrailRequest; } - private boolean determineContrail() { - return (networkTechnology == NetworkTechnology.CONTRAIL && (contrailNetwork != null)); - } } diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java index a7976840b7..595662251f 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java @@ -52,7 +52,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon { private String networkType; private String networkTypeVersion; private String modelCustomizationUuid; - private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON; + private String networkTechnology = "NEUTRON"; private List<Subnet> subnets; private ProviderVlanNetwork providerVlanNetwork; private ContrailNetwork contrailNetwork; @@ -130,13 +130,12 @@ public class UpdateNetworkRequest extends NetworkRequestCommon { this.networkTypeVersion = networkTypeVersion; } - public NetworkTechnology getNetworkTechnology() { + public String getNetworkTechnology() { return networkTechnology; } - public void setNetworkTechnology(NetworkTechnology networkTechnology) { + public void setNetworkTechnology(String networkTechnology) { this.networkTechnology = networkTechnology; - this.contrailRequest = determineContrail(); } public List<Subnet> getSubnets() { @@ -161,7 +160,6 @@ public class UpdateNetworkRequest extends NetworkRequestCommon { public void setContrailNetwork(ContrailNetwork contrailNetwork) { this.contrailNetwork = contrailNetwork; - this.contrailRequest = determineContrail(); } public Boolean getBackout() { @@ -195,8 +193,4 @@ public class UpdateNetworkRequest extends NetworkRequestCommon { return contrailRequest; } - private boolean determineContrail() { - return (networkTechnology == NetworkTechnology.CONTRAIL && (contrailNetwork != null)); - } - } diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java index 08851c2ce9..5e04fc49ee 100644 --- a/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/onap/so/adapters/nwrest/NetworkRequestTest.java @@ -38,13 +38,4 @@ public class NetworkRequestTest { assertEquals(true, networkResponse.isSynchronous()); } - @Test - public void isContrailRequest() { - CreateNetworkRequest networkResponse = new CreateNetworkRequest(); - assertEquals(false, networkResponse.isContrailRequest()); - networkResponse.setNetworkTechnology(NetworkTechnology.CONTRAIL); - assertEquals(false, networkResponse.isContrailRequest()); - networkResponse.setContrailNetwork(new ContrailNetwork()); - assertEquals(true, networkResponse.isContrailRequest()); - } } |