2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
16 import {Factory} from 'rosie';
17 import randomstring from 'randomstring';
18 import IdMixin from 'test-utils/factories/mixins/IdMixin.js';
20 export const VSPComponentsNicFactory = new Factory()
22 name: () => randomstring.generate(),
23 description: () => randomstring.generate(),
26 .attr('networkName', ['name'], name => `n${name}`);
28 export const VSPComponentsNicWithIdFactory = new Factory()
29 .extend(VSPComponentsNicFactory)
32 export const VSPComponentsNetworkFactory = new Factory()
38 export const VSPComponentsNetworkQDataFactory = new Factory()
41 protocolWithHighestTrafficProfile: 'UDP',
49 export const VSPComponentsNetworkDataMapFactory = new Factory()
51 'protocols/protocolWithHighestTrafficProfile' : 'UDP',
52 'protocols/protocols' : ['UDP'],
53 'ipConfiguration/ipv4Required' : true
56 export const VSPComponentsNicFactoryGenericFieldInfo = new Factory()
70 export const VSPComponentsNicFactoryQGenericFieldInfo = new Factory()
72 'protocols/protocols': {
107 'protocols/protocolWithHighestTrafficProfile': {
112 'ipConfiguration/ipv4Required': {
119 'ipConfiguration/ipv6Required': {
126 'network/networkDescription': {
141 'sizing/describeQualityOfService': {
147 'sizing/inflowTrafficPerSecond/packets/peak': {
153 'sizing/inflowTrafficPerSecond/packets/avg': {
159 'sizing/inflowTrafficPerSecond/bytes/peak': {
165 'sizing/inflowTrafficPerSecond/bytes/avg': {
171 'sizing/outflowTrafficPerSecond/packets/peak': {
177 'sizing/outflowTrafficPerSecond/packets/avg': {
183 'sizing/outflowTrafficPerSecond/bytes/peak': {
189 'sizing/outflowTrafficPerSecond/bytes/avg': {
195 'sizing/flowLength/packets/peak': {
201 'sizing/flowLength/packets/avg': {
207 'sizing/flowLength/bytes/peak': {
213 'sizing/flowLength/bytes/avg': {
219 'sizing/acceptableJitter/mean': {
225 'sizing/acceptableJitter/max': {
231 'sizing/acceptableJitter/variable': {
237 'sizing/acceptablePacketLoss': {
254 export const VSPComponentsVersionControllerFactory = new Factory()
256 version: { id: '1.1', label: '1.1'},
257 viewableVersions: [{id: '1.0', label: '1.0'}, {id: '1.1', label: '1.1'}, {id: '1.2', label: '1.2'}],