2 * Copyright 2016 RIFT.IO Inc
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * STANDARD_RIFT_IO_COPYRIGHT
21 * Created by onvelocity on 11/23/15.
26 import DescriptorModel from '../DescriptorModel'
29 * This class creates the identity of a VirtualNetworkFunctionConnectionPoint on a VNFD. Visually
30 * this class represents an svg:Path between the parent VLD and VirtualNetworkFunctionConnectionPoint.
32 * VNFD.VirtualNetworkFunctionConnectionPoint ====path==== VLD
34 * The VNFD is referenced by nsd.constituent-vnfd.member-vnf-index.
35 * The VirtualNetworkFunctionConnectionPoint is referenced by vnfd.connection-point.name.
37 export default class VnfdConnectionPointRef extends DescriptorModel {
40 return 'vnfd-connection-point-ref';
43 static get className() {
44 return 'VnfdConnectionPointRef';
47 constructor(model, parent) {
49 this.type = 'vnfd-connection-point-ref';
50 this.uiState['qualified-type'] = 'nsd.vld.vnfd-connection-point-ref';
51 this.className = 'VnfdConnectionPointRef';
55 return this.model['member-vnf-index-ref'] + '/' + this.model['vnfd-connection-point-ref'];
63 return this.model['vnfd-id-ref'];
67 return this.model['vnfd-id-ref'] = id;
71 return this.model['member-vnf-index-ref'];
74 set vnfdIndex(index) {
75 return this.model['member-vnf-index-ref'] = index;
78 get vnfdConnectionPointName() {
79 return this.model['vnfd-connection-point-ref'];
82 set vnfdConnectionPointName(name) {
83 return this.model['vnfd-connection-point-ref'] = name;
87 return this.uiState.cpNumber;
91 this.uiState.cpNumber = n;
96 return this.parent.removeVnfdConnectionPointRefKey(this.key);