Bug 1383 Error when consulting NS instance's topology

 * SOL006 Descriptor topology changes

Change-Id: I79afb00dfb54ce2c9dc02c0c4b7bbe435b07a915
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
diff --git a/src/models/CommonModel.ts b/src/models/CommonModel.ts
index fb9707a..d157115 100644
--- a/src/models/CommonModel.ts
+++ b/src/models/CommonModel.ts
@@ -20,6 +20,7 @@
 /**
  * @file  Model for Commonly used information.
  */
+// tslint:disable: completed-docs
 /**
  * handle count @enum
  */
@@ -112,12 +113,12 @@
 export interface DELETEPARAMS {
     identifier: string;
     name?: string;
-    shortName: string;
     projectName?: string;
     userName?: string;
     username?: string;
     page?: string;
     id?: string;
+    productName?: string;
 }
 
 /** Interface for the Delete Details */
@@ -221,6 +222,15 @@
     value: string;
     title: string;
 }
+/** Interface for PRIMITIVETYPES */
+export interface PRIMITIVETYPES {
+    title: string;
+    value: string;
+}
+/** Interface for the PRIMITIVEDATA */
+export interface PRIMITIVEDATA {
+    parameter: {}[];
+}
 /** Interface for VIM type Openstack's Config */
 export const TYPEOPENSTACK: {} = {
     sdn_controller: '',
diff --git a/src/models/NSDModel.ts b/src/models/NSDModel.ts
index 354ccde..131af47 100644
--- a/src/models/NSDModel.ts
+++ b/src/models/NSDModel.ts
@@ -18,21 +18,17 @@
 /**
  * @file  Model for NSD related information.
  */
-
+// tslint:disable: completed-docs
 import { VNFDAdminDetails } from './VNFDModel';
 
 /** Interface for NSData */
 export interface NSData {
-    shortName?: string;
-    identifier: string;
-    description: string;
-    vendor?: string;
+    id?: string;
+    identifier?: string;
+    description?: string;
     version: string;
-    page?: string;
     name?: string;
-    projectName?: string;
-    userName?: string;
-    username?: string;
+    designer?: string;
 }
 
 /** Interface for the nscompose descriptors content */
@@ -43,14 +39,16 @@
     id: string;
     logo: string;
     name: string;
-    'short-name': string;
-    vendor: string;
     version: string;
     vld: VLD[];
     _admin: VNFDAdminDetails;
     _id: string;
     _links?: string;
     'constituent-vnfr-ref': string[];
+    'virtual-link-desc': VLD[];
+    df: DF[];
+    'vnfd-id': string[];
+    designer?: string;
 }
 
 /** Interface for the connection-point */
@@ -68,27 +66,16 @@
 /** Interface for the vld */
 export interface VLD {
     id: string;
-    'mgmt-network': boolean;
-    name: string;
-    'short-name'?: string;
-    'type': string;
-    'vnfd-connection-point-ref'?: VNFDCONNECTIONPOINTREF[];
-    'vim-network-name': string;
+    'mgmt-network'?: boolean;
 }
 
-/** Interface for VNFDCONNECTIONPOINTREF */
-export interface VNFDCONNECTIONPOINTREF {
-    'member-vnf-index-ref': number;
-    'vnfd-connection-point-ref': string;
-    'vnfd-id-ref': string;
-}
 /** Interface Nodes Creation */
 export interface COMPOSERNODES {
     id: string;
     reflexive: Boolean;
     'type': string;
     name?: string;
-    nodeIndex?: number;
+    nodeIndex?: string;
     selectorId?: string;
     x?: number;
     y?: number;
@@ -110,20 +97,8 @@
     y: number;
     id: string;
     'type'?: string;
-}
-
-/** Interface for the NSD */
-interface NSD {
-    'constituent-vnfd': CONSTITUENTVNFD[];
-    description: string;
-    id: string;
-    name: string;
-    'short-name': string;
-    vendor: string;
-    version: string;
-    vld: VLD[];
-    _admin: VNFDAdminDetails;
-    _id: string;
+    name?: string;
+    nodeIndex?: string;
 }
 /** Interface for the GRAPHDETAILS */
 export interface GRAPHDETAILS {
@@ -181,3 +156,36 @@
     'juju-bundle': string;
     'kdu-configuration': {};
 }
+
+/** Interface for the DF */
+export interface DF {
+    id: string;
+    'vnf-profile': VNFPROFILE[];
+}
+
+/** Interface for the DF */
+export interface VNFPROFILE {
+    id: string;
+    'virtual-link-connectivity': VLC[];
+    'vnfd-id': string;
+}
+
+/** Interface for the VLC */
+export interface VLC {
+    'constituent-cpd-id': CCI[];
+    'virtual-link-profile-id': string;
+}
+
+/** Interface for the CCI */
+export interface CCI {
+    'constituent-base-element-id': string;
+    'constituent-cpd-id': string;
+}
+/** Interface for NSDATACREATION */
+export interface NSDATACREATION {
+    nsd: NSDETAILDATA;
+}
+/** Interface for NSDETAILDATA */
+export interface NSDETAILDATA {
+    nsd: NSDDetails[];
+}
diff --git a/src/models/NSInstanceModel.ts b/src/models/NSInstanceModel.ts
index 72cd42b..6bafcdd 100644
--- a/src/models/NSInstanceModel.ts
+++ b/src/models/NSInstanceModel.ts
@@ -18,8 +18,8 @@
 /**
  * @file  Model for NS Instance related information.
  */
-
-import { CONSTITUENTVNFD, VLD, VNFDCONNECTIONPOINTREF } from 'NSDModel';
+// tslint:disable: completed-docs
+import { CONSTITUENTVNFD, DF, VLD } from 'NSDModel';
 import { VNFDAdminDetails } from 'VNFDModel';
 
 /** Interface for NSInstanceDetails */
@@ -36,7 +36,6 @@
     nsd: NSD;
     name: string;
     'name-ref': string;
-    'short-name': string;
     id: string;
     'nsd-name-ref': string;
     description: string;
@@ -100,17 +99,17 @@
 /** Interface for NSD */
 export interface NSD {
     description: string;
-    vld: NSDVLD[];
     _admin: VNFDAdminDetails;
     name: string;
     version: string;
     _id: string;
-    'short-name': string;
     id: string;
     'constituent-vnfd': CONSTITUENTVNFD[];
     vendor: string;
     vdur: string[];
     'connection-point': CONNECTIONPOINT[];
+    'virtual-link-desc': NSDVLD[];
+    df: DF[];
 }
 
 /** Interface for _AdminDetails */
@@ -146,8 +145,7 @@
     'vim-network-name': string;
     id: string;
     'type': string;
-    'vnfd-connection-point-ref': VNFDCONNECTIONPOINTREF[];
-    'short-name': string;
+    df: DF[];
 }
 
 /** Interface for InstantiateParam */
@@ -179,7 +177,7 @@
     ConfigStatus: string;
     DetailedStatus: string;
     state?: string;
-    memberIndex?: object;
+    memberIndex?: DF[];
     nsConfig?: object;
 }
 
@@ -199,7 +197,7 @@
     nodeTypeRef?: string;
     name?: string;
     'type'?: string;
-    vnfdCP?: VNFDCONNECTIONPOINTREF[];
+    vnfdCP?: DF[];
     vimNetworkName?: string;
     shortName?: string;
     cp?: CONNECTIONPOINT[];
@@ -214,6 +212,8 @@
     vnfdRef?: string;
     vndfCPRef?: string;
     selectorId?: string;
+    reflexive?: Boolean;
+    nodeIndex?: number;
 }
 
 /** Interface for the connection-point */
diff --git a/src/models/VNFDModel.ts b/src/models/VNFDModel.ts
index 364d37e..4f76f7c 100644
--- a/src/models/VNFDModel.ts
+++ b/src/models/VNFDModel.ts
@@ -18,7 +18,7 @@
 /**
  * @file  Model for VNFD related information.
  */
-
+// tslint:disable: completed-docs
 /** Interface for Project */
 export interface ProjectModel {
     project_id: string;
@@ -47,100 +47,150 @@
     created: string;
 }
 
-/** Interface for VNFD NODE Details */
-export interface VNFDNODE {
-    nodeTypeRef?: string;
-    'connection-point'?: CONNECTIONPOINT[];
+/** Interface for VNFD Details */
+export interface VNFD {
     description?: string;
+    df?: DF[];
+    'ext-cpd'?: EXTCPD[];
     id: string;
-    'internal-vld'?: InternalVLD[];
-    version?: string;
-    name?: string;
-    'mgmt-interface'?: MGMT;
-    _id?: string;
-    vdu?: VDU[];
-    _admin?: VNFDAdminDetails;
-    'short-name'?: string;
-    shortName?: string;
-    vendor?: string;
-    'type'?: string;
-    'cloud-init-file'?: string;
-    count?: number;
-    vduID?: string;
-    'interface'?: VNFDInterface[];
-    'vm-flavor'?: VMFlavor;
-    intVLID?: string;
-    'internal-connection-point'?: VLDInternalConnectionPoint[];
-    'monitoring-param'?: MonitoringParam[];
-    'ip-profile-ref'?: string;
-    'id-ref'?: string;
-    'ip-address'?: string;
-    reflexive?: boolean;
-    image?: string;
-}
-
-/** Interface for VNFDDetails */
-export interface VNFDDetails {
-    'connection-point': CONNECTIONPOINT[];
-    description: string;
-    id: string;
-    'internal-vld': InternalVLD[];
-    version: string;
-    name: string;
-    'mgmt-interface': MGMT;
-    _id: string;
-    vdu: VDU[];
-    _admin: VNFDAdminDetails;
-    'short-name': string;
-    vendor: string;
+    'int-virtual-link-desc'?: IVLD[];
+    'mgmt-cp'?: string;
+    onboardingState?: string;
+    operationalState?: string;
     'product-name'?: string;
+    provider?: string;
+    'sw-image-desc'?: SWIMAGEDESCRIPTION[];
+    usageState?: string;
+    vdu?: VDU[];
+    version?: string;
+    'virtual-compute-desc'?: string;
+    'virtual-storage-desc'?: string[];
+    _admin?: VNFDAdminDetails;
+    _id?: string;
+    _links?: string;
+    'vnf-configuration'?: VNFCONFIG[];
+    kdu?: [];
 }
-
-/** Interface for MGMT */
-interface MGMT {
-    cp: string;
+/** Interface for DF */
+export interface VNFCONFIG {
+    id: string;
+    'config-primitive'?: CONFIGPRIMITIVE[];
+    'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[];
 }
-
+/** Interface for DF */
+export interface DF {
+    id: string;
+    'instantiation-level'?: INSTANTIATIONLEVEL[];
+    'vdu-profile'?: VDUPROFILE[];
+    'vnf-configuration-id'?: string;
+}
+/** Interface for INSTANTIATIONLEVEL */
+export interface INSTANTIATIONLEVEL {
+    id: string;
+    'vdu-level': VDULEVEL[];
+}
+/** Interface for VDULEVEL */
+export interface VDULEVEL {
+    'number-of-instances': number;
+    'vdu-id': string;
+}
+/** Interface for VDULEVEL */
+export interface VDUPROFILE {
+    id: string;
+    name?: string;
+    'min-number-of-instances'?: number;
+    'max-number-of-instances'?: number;
+    'vdu-configuration-id'?: string;
+    'vdu-configuration'?: VDUCONFIG;
+}
+/** Interface for VDUCONFIG */
+export interface VDUCONFIG {
+    id: string;
+    'config-primitive': CONFIGPRIMITIVE[];
+    'initial-config-primitive': INITIALCONFIGPRIMITIVE[];
+}
+/** Interface for CONFIGPRIMITIVE */
+export interface CONFIGPRIMITIVE {
+    name: string;
+}
+/** Interface for INITIALCONFIGPRIMITIVE */
+export interface INITIALCONFIGPRIMITIVE {
+    seq: string;
+    name: string;
+}
+/** Interface for the ext-cpd */
+export interface EXTCPD {
+    id?: string;
+    'int-cpd'?: INTCPD;
+}
+/** Interface for the int-cpd */
+export interface INTCPD {
+    cpd?: string;
+    'vdu-id'?: string;
+}
+/** Interface for IVLD */
+export interface IVLD {
+    id?: string;
+    description?: string;
+}
+/** Interface for SWIMAGEDESCRIPTION */
+export interface SWIMAGEDESCRIPTION {
+    id: string;
+    name: string;
+    version: string;
+}
 /** Interface for VDU */
 export interface VDU {
-    nodeTypeRef?: string;
     'cloud-init-file'?: string;
-    count?: number;
     description?: string;
     id?: string;
-    image?: string;
-    'interface'?: VNFDInterface[];
-    'internal-connection-point'?: VDUInternalConnectionPoint[];
+    'int-cpd'?: VDUINTCPD[];
+    'monitoring-parameter'?: MonitoringParam[];
     name?: string;
-    'vm-flavor'?: VMFlavor;
-    vduInterface?: string;
-    'monitoring-param'?: MonitoringParam[];
+    'sw-image-desc'?: string;
+    'virtual-compute-desc'?: string;
+    'virtual-storage-desc'?: string[];
 }
-
-/** Interface for VMFlavor */
-interface VMFlavor {
-    'storage-gb'?: string;
-    'memory-mb'?: string;
-    'vcpu-count'?: string;
+/** Interface for the vdu int-cpd */
+export interface VDUINTCPD {
+    id: string;
+    'int-virtual-link-desc'?: string;
+    'virtual-network-interface-requirement': VNIR[];
 }
-
-/** Interface for VNFDInterface */
-export interface VNFDInterface {
-    'external-connection-point-ref'?: string;
-    'internal-connection-point-ref'?: string;
-    'mgmt-interface'?: boolean;
-    name?: string;
-    'type'?: string;
-    position?: boolean;
-    'virtual-interface'?: VirtualInterface;
+/** Interface for the vdu int-cpd => VNIR */
+export interface VNIR {
+    name: string;
+    position: number;
+    'virtual-interface': VIRTUALINTERFACE;
 }
-
-/** Interface for VDU Internal Connection Point */
-export interface VDUInternalConnectionPoint {
+/** Interface for the VIRTUALINTERFACE */
+export interface VIRTUALINTERFACE {
+    'type': string;
+}
+/** Interface for monitoring params */
+export interface MonitoringParam {
     id: string;
     name?: string;
-    'short-name'?: string;
-    'type'?: string;
+    'performance-metric'?: string;
+    'collection-period'?: number;
+}
+/** Interface for VNFDATA */
+export interface VNFDATA {
+    vnfd?: VNFD;
+}
+
+/** Interface for VDU InternalCPD */
+export interface InternalCPD {
+    id: string;
+    'int-virtual-link-desc'?: string;
+    'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT;
+}
+
+/** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */
+export interface VIRTUALNETWORKINTERFACEREQUIREMENT {
+    name: string;
+    position?: number;
+    'virtual-interface'?: VirtualInterface;
 }
 
 /** Interface for VirutalInterface */
@@ -148,45 +198,7 @@
     'type': string;
 }
 
-/** Interface for the connection-point */
-export interface CONNECTIONPOINT {
-    nodeTypeRef?: string;
-    'connection-point-id'?: string;
-    name?: string;
-    id: string;
-    'type'?: string;
-}
-
-/** Interface for Internal VLD */
-export interface InternalVLD {
-    nodeTypeRef?: string;
-    id?: string;
-    'internal-connection-point'?: VLDInternalConnectionPoint[];
-    'ip-profile-ref'?: string;
-    name?: string;
-    'short-name'?: string;
-    'type'?: string;
-    'shortName'?: string;
-    'ipProfileRef'?: string;
-}
-
-/** Interface for VLD Internal Connection Point */
-export interface VLDInternalConnectionPoint {
-    nodeTypeRef?: string;
-    'ip-address'?: string;
-    'id-ref'?: string;
-    'shortName'?: string;
-}
-
-/** Interface for monitoring params */
-export interface MonitoringParam {
-    id: string;
-    'nfvi-metric'?: string;
-    'interface-name-ref'?: string;
-}
-
 /** Interface for _AdminDetails */
-// tslint:disable-next-line:class-name
 export interface VNFDAdminDetails {
     created: number;
     modified: string;
@@ -212,15 +224,14 @@
 
 /** Interface for VNFData */
 export interface VNFData {
-    name?: string;
+    identifier?: string;
     id?: string;
-    shortName?: string;
-    identifier: string;
+    name?: string;
     description: string;
-    vendor?: string;
     version: string;
     'type'?: string;
     productName?: string;
+    provider?: string;
 }
 
 /** Interface for the Tick */
@@ -242,10 +253,11 @@
 /** Interface Nodes Creation */
 export interface COMPOSERNODES {
     id: string;
-    reflexive?: boolean;
-    'type'?: string;
+    reflexive: Boolean;
+    'type': string;
     name?: string;
-    nodeTypeRef?: string;
+    nodeIndex?: number;
+    selectorId?: string;
     x?: number;
     y?: number;
     fx?: number;