summaryrefslogtreecommitdiffstats
path: root/nokiav2/generatedapis/src/main
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-03-03 11:44:14 +0100
committerDenes Nemeth <denes.nemeth@nokia.com>2018-03-03 11:44:14 +0100
commitc13b3688cd0bc63954c78819fe4bad148c8ac2a3 (patch)
tree11bf76b9c11bc0bfaff2bfdf9cd28e96c12c6a20 /nokiav2/generatedapis/src/main
parent4d24e40338421555cad5cd5f9691894a1eb15843 (diff)
Fix CP handling
Change-Id: I8105b4a8e9bb56b52a1cd6af4991cf1eb023f953 Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728
Diffstat (limited to 'nokiav2/generatedapis/src/main')
-rw-r--r--nokiav2/generatedapis/src/main/resources/patch183
1 files changed, 0 insertions, 183 deletions
diff --git a/nokiav2/generatedapis/src/main/resources/patch b/nokiav2/generatedapis/src/main/resources/patch
index e19dd1a0..562c7a1d 100644
--- a/nokiav2/generatedapis/src/main/resources/patch
+++ b/nokiav2/generatedapis/src/main/resources/patch
@@ -1,186 +1,3 @@
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java 2018-02-19 17:32:34.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java 2018-02-19 17:34:43.000000000 +0100
-@@ -13,14 +13,12 @@
-
- package com.nokia.cbam.lcm.v32;
-
--import com.google.gson.Gson;
--import com.google.gson.GsonBuilder;
--import com.google.gson.JsonParseException;
--import com.google.gson.TypeAdapter;
-+import com.google.gson.*;
-+import com.google.gson.internal.Streams;
- import com.google.gson.internal.bind.util.ISO8601Utils;
- import com.google.gson.stream.JsonReader;
-+import com.google.gson.stream.JsonToken;
- import com.google.gson.stream.JsonWriter;
--import com.google.gson.JsonElement;
- import io.gsonfire.GsonFireBuilder;
- import io.gsonfire.TypeSelector;
- import org.threeten.bp.LocalDate;
-@@ -46,6 +44,8 @@
- private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
- private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
-+ private VimInfoTypeAdapter vimInfoTypeAdapter = new VimInfoTypeAdapter();
-+ private LcnAdapter lcnAdapter = new LcnAdapter();
-
- public static GsonBuilder createGson() {
- GsonFireBuilder fireBuilder = new GsonFireBuilder()
-@@ -75,6 +75,8 @@
- .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
- .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
-+ .registerTypeAdapter(VimInfo.class, vimInfoTypeAdapter)
-+ .registerTypeAdapter(AbstractVnfNotification.class, lcnAdapter)
- .create();
- }
-
-@@ -349,6 +351,67 @@
- }
- }
-
-+ static abstract class AbstractTypeAdapter<T> extends TypeAdapter<T>{
-+
-+ @Override
-+ public void write(JsonWriter out, T value) throws IOException {
-+ out.jsonValue(new Gson().toJson(value));
-+ }
-+
-+ @Override
-+ public T read(JsonReader in) throws IOException {
-+ switch (in.peek()) {
-+ case NULL:
-+ in.nextNull();
-+ return null;
-+ default:
-+ JsonElement object = Streams.parse(in);
-+ String type = object.getAsJsonObject().get(getTypeField()).getAsString();
-+ Type typeOfT = getTypeMap().get(type);
-+ return new Gson().fromJson(object, typeOfT);
-+ }
-+ }
-+
-+ abstract protected String getTypeField();
-+ abstract protected Map<String, Type> getTypeMap();
-+
-+ }
-+
-+ public static class VimInfoTypeAdapter extends AbstractTypeAdapter<VimInfo> {
-+
-+ @Override
-+ protected String getTypeField() {
-+ return "vimInfoType";
-+ }
-+
-+ @Override
-+ protected Map<String, Type> getTypeMap() {
-+ Map<String,Type> myMap = new HashMap<String,Type>();
-+ myMap.put(VimInfo.VimInfoTypeEnum.OPENSTACK_V2_INFO.name(), OPENSTACKV2INFO.class);
-+ myMap.put(VimInfo.VimInfoTypeEnum.OPENSTACK_V3_INFO.name(), OPENSTACKV3INFO.class);
-+ myMap.put(VimInfo.VimInfoTypeEnum.VMWARE_VCLOUD_INFO.name(), VMWAREVCLOUDINFO.class);
-+ return myMap;
-+ }
-+ }
-+
-+ public static class LcnAdapter extends AbstractTypeAdapter<AbstractVnfNotification>{
-+ @Override
-+ protected String getTypeField() {
-+ return "notificationType";
-+ }
-+
-+ @Override
-+ protected Map<String, Type> getTypeMap() {
-+ Map<String,Type> myMap = new HashMap<String,Type>();
-+ myMap.put(VnfNotificationType.VNFIDENTIFIERCREATIONNOTIFICATION.name(), VnfIdentifierCreationNotification.class);
-+ myMap.put(VnfNotificationType.VNFIDENTIFIERDELETIONNOTIFICATION.name(), VnfIdentifierDeletionNotification.class);
-+ myMap.put(VnfNotificationType.VNFINFOATTRIBUTEVALUECHANGENOTIFICATION.name(), VnfInfoAttributeValueChangeNotification.class);
-+ myMap.put(VnfNotificationType.VNFLIFECYCLECHANGENOTIFICATION.name(), VnfLifecycleChangeNotification.class);
-+ myMap.put(VnfNotificationType.OTHERNOTIFICATION.name(), OtherNotification.class);
-+ return myMap;
-+ }
-+ }
-+
- public JSON setDateFormat(DateFormat dateFormat) {
- dateTypeAdapter.setFormat(dateFormat);
- return this;
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java 2018-02-19 17:34:43.000000000 +0100
-@@ -43,13 +43,13 @@
- return false;
- }
- OTHERVIMINFO OTHER_VIM_INFO = (OTHERVIMINFO) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- OtherNotification otherNotification = (OtherNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- VnfIdentifierCreationNotification vnfIdentifierCreationNotification = (VnfIdentifierCreationNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash(super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- VnfIdentifierDeletionNotification vnfIdentifierDeletionNotification = (VnfIdentifierDeletionNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java
--- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java 2018-02-19 17:32:33.000000000 +0100
+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java 2018-02-19 17:38:08.000000000 +0100