d69451a8f2dacccf0f4f426784c7cebe99b09960
[sdc/sdc-distribution-client.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * sdc-distribution-client
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.impl.mock;
22
23 import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
24
25 /** Mock Implementation */
26 public class DistributionClientDownloadResultStubImpl extends DistributionClientResultStubImpl implements IDistributionClientDownloadResult {
27
28         @Override
29         public byte[] getArtifactPayload() {
30                 String mockPayload = "heat_template_version: 2013-05-23\r\n" + 
31                                 "\r\n" + 
32                                 "description: >\r\n" + 
33                                 "  HOT template that creates one COR network (direct).\r\n" + 
34                                 "\r\n" + 
35                                 "parameters:\r\n" + 
36                                 "  cor_direct_net_name:\r\n" + 
37                                 "    type: string\r\n" + 
38                                 "    description: Name of COR direct network\r\n" + 
39                                 "  cor_direct_net_cidr:\r\n" + 
40                                 "    type: string\r\n" + 
41                                 "    description: Direct network address (CIDR notation)\r\n" + 
42                                 "  cor_direct_net_gateway:\r\n" + 
43                                 "    type: string\r\n" + 
44                                 "    description: Direct network gateway address\r\n" + 
45                                 "  cor_direct_net_RT:\r\n" + 
46                                 "    type: string\r\n" + 
47                                 "    description: Direct network route-target (RT)\r\n" + 
48                                 "\r\n" + 
49                                 "resources:\r\n" + 
50                                 "  cor_direct_net:\r\n" + 
51                                 "    type: OS::Contrail::VirtualNetwork\r\n" + 
52                                 "    properties:\r\n" + 
53                                 "      name: { get_param: cor_direct_net_name }\r\n" + 
54                                 "      route_targets: [ get_param: cor_direct_net_RT ]\r\n" + 
55                                 "\r\n" + 
56                                 "  cor_direct_ip_subnet:\r\n" + 
57                                 "    type: OS::Neutron::Subnet\r\n" + 
58                                 "    properties:\r\n" + 
59                                 "      network_id: { get_resource: cor_direct_net }\r\n" + 
60                                 "      cidr: {get_param: cor_direct_net_cidr}\r\n" + 
61                                 "      gateway_ip: { get_param: cor_direct_net_gateway }\r\n";
62                 
63                 return mockPayload.getBytes();
64         }
65
66         @Override
67         public String getArtifactName() {
68                 // TODO Auto-generated method stub
69                 return "MackArtifactName";
70         }
71
72 }