3 * Copyright 2016 RIFT.IO Inc
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * Created by onvelocity on 11/23/15.
24 import DescriptorModel
from '../DescriptorModel'
27 * This class creates the identity of a VirtualNetworkFunctionConnectionPoint on a VNFD. Visually
28 * this class represents an svg:Path between the parent VLD and VirtualNetworkFunctionConnectionPoint.
30 * VNFD.VirtualNetworkFunctionConnectionPoint ====path==== VLD
32 * The VNFD is referenced by nsd.constituent-vnfd.member-vnf-index.
33 * The VirtualNetworkFunctionConnectionPoint is referenced by vnfd.connection-point.name.
35 export default class VnfdConnectionPointRef
extends DescriptorModel
{
38 return 'vnfd-connection-point-ref';
41 static get className() {
42 return 'VnfdConnectionPointRef';
45 constructor(model
, parent
) {
47 this.type
= 'vnfd-connection-point-ref';
48 this.uiState
['qualified-type'] = 'nsd.vld.vnfd-connection-point-ref';
49 this.className
= 'VnfdConnectionPointRef';
53 return this.model
['member-vnf-index-ref'] + '/' + this.model
['vnfd-connection-point-ref'];
61 return this.model
['vnfd-id-ref'];
65 return this.model
['vnfd-id-ref'] = id
;
69 return this.model
['member-vnf-index-ref'];
72 set vnfdIndex(index
) {
73 return this.model
['member-vnf-index-ref'] = index
;
76 get vnfdConnectionPointName() {
77 return this.model
['vnfd-connection-point-ref'];
80 set vnfdConnectionPointName(name
) {
81 return this.model
['vnfd-connection-point-ref'] = name
;
85 return this.uiState
.cpNumber
;
89 this.uiState
.cpNumber
= n
;
93 return this.model
['order'];
97 this.model
['order'] = n
;
102 return this.parent
.removeVnfdConnectionPointRefKey(this.key
);