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';
19 export const VSPAttachmentsErrorFactory = new Factory()
23 .sequence('message', index => `error no. ${index}`);
25 export const VSPHeatFactory = new Factory()
27 fileName: () => `${randomstring.generate()}.yaml`,
29 fileName: () => `${randomstring.generate()}.env`
31 errors: Factory.buildList(VSPAttachmentsErrorFactory)
34 export const VSPAttachmentTreeNodeFactory = new Factory()
40 export const VSPAttachmentTreeNodeWithChildrenFactory = new Factory()
41 .extend(VSPAttachmentTreeNodeFactory)
47 export const VSPAttachmentDetailedError = new Factory()
50 errorMessage: 'Resource is not defined as output and thus cannot be Shared. resource id - network_4',
51 name: () => `${randomstring.generate()}.yaml`,
57 export const HeatSetupModuleBase = new Factory()
59 .attr('name', ['name'], (name) => {
60 return name ? randomstring.generate(5) : '';
64 yaml: () => {return 'yaml_' + randomstring.generate(5) + '.yaml';},
65 env: () => {return 'env_' + randomstring.generate(5) + '.env';},
66 vol: () => {return 'vol_' + randomstring.generate(5) + '.vol';},
67 volEnv: () => {return 'volEnv_' + randomstring.generate(5) + '.env';}
70 export const heatSetupManifest = new Factory()
74 name: 'BASE_sdjflsjldfsd',
76 yaml: 'yaml_filename9.yaml',
77 env: 'env_filename8.env',
78 vol: 'vol_filename5.vol',
79 volEnv: 'vol_env_filename1.8.vol',
83 name: 'MODULE_asdkjfhkajsf',
85 yaml: 'yaml_filename.yaml',
86 env: 'env_filename.env',
87 vol: 'vol_filename.vol',
88 volEnv: 'vol_env_filename.vol',
93 'hot-nimbus-oam-volumes_v1.0.env',
94 'hot-nimbus-oam_v1.0.env',
95 'hot-nimbus-oam-volumes_v1.1.env',
96 'hot-nimbus-oam-volumes_v2.0.env',
98 'hot-nimbus-oam-volumes_v4.0.env',
99 'hot-nimbus-oam-volumes_v5.0.env',
100 'hot-nimbus-oam_v6.0.env',
101 'hot-nimbus-oam-volumes_v7.0.env',
104 artifacts: ['hot-nimbus-oam_v3.0.env'],
105 nested: ['nested-ppd_v1.1.yaml', 'nested-ppd_v1.0.yaml', 'nested-ppd_v8.0.yaml']