diff options
author | Michael Lando <ml636r@att.com> | 2018-03-04 14:53:33 +0200 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2018-03-07 13:19:05 +0000 |
commit | a5445100050e49e83f73424198d73cd72d672a4d (patch) | |
tree | cacf4df817df31be23e4e790d1dda857bdae061e /catalog-ui/src/app/models/forwarding-path.ts | |
parent | 51157f92c21976cba4914c378aaa3cba49826931 (diff) |
Sync Integ to Master
Change-Id: I71e3acc26fa612127756ac04073a522b9cc6cd74
Issue-ID: SDC-977
Signed-off-by: Gitelman, Tal (tg851x) <tg851x@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/models/forwarding-path.ts')
-rw-r--r-- | catalog-ui/src/app/models/forwarding-path.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/forwarding-path.ts b/catalog-ui/src/app/models/forwarding-path.ts new file mode 100644 index 0000000000..2158dfe479 --- /dev/null +++ b/catalog-ui/src/app/models/forwarding-path.ts @@ -0,0 +1,30 @@ +import {PathElements} from './path-elements'; +import {ForwardingPathLink} from "./forwarding-path-link"; + +export class ForwardingPath { + public name:string; + public destinationPortNumber:string; + public protocol:string; + public uniqueId:string; + public ownerId: string; + public pathElements: PathElements; + + addPathLink(fromNode:string, fromCP:string, toNode:string, toCP:string, fromCPOriginId: string, toCPOriginId: string) { + if (!this.pathElements) { + this.pathElements = new PathElements(); + } + this.pathElements.listToscaDataDefinition[this.pathElements.listToscaDataDefinition.length] = new ForwardingPathLink(fromNode, fromCP, toNode, toCP, fromCPOriginId, toCPOriginId); + } + + deserialize(response:any) { + this.name = response.name; + this.destinationPortNumber = response.destinationPortNumber; + this.protocol = response.protocol; + if (response.pathElements && response.pathElements.listToscaDataDefinition) { + let list = response.pathElements.listToscaDataDefinition; + for (let i = 0; i < list.length; i++) { + this.addPathLink(list[i].fromNode, list[i].fromCP, list[i].toNode, list[i].toCP, list[i].fromCPOriginId, list[i].toCPOriginId); + } + } + } +}; |