summaryrefslogtreecommitdiffstats
path: root/vcpe_beijing/mockserver/post.json
blob: 456f9b3a533662741188d877955fc7388a6ef4c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
    "template": "##########################################################################\n#\n#==================LICENSE_START==========================================\n#\n#\n# Copyright 2017 AT&T Intellectual Property. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#        http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#==================LICENSE_END============================================\n#\n# ECOMP is a trademark and service mark of AT&T Intellectual Property.\n#\n##########################################################################\n\nheat_template_version: 2013-05-23\n\ndescription: Heat template to deploy vCPE vBRG Emulator (vBRGEMU)\n\n#######################################################################\n#                                                                     #\n# PARAMETERS \t\t\t\t\t\t\t                                            #\n#                                                                     #\n#     0_port should get IP address from DHCP discover through vBNG    #\n#     DCAE is not monitoring the BRGEMULATOR                          #\n#######################################################################\n\nparameters:\n  vcpe_image_name:\n    type: string\n    label: Image name or ID\n    description: Image to be used for compute instance\n  vcpe_flavor_name:\n    type: string\n    label: Flavor\n    description: Type of instance (flavor) to be used\n  public_net_id:\n    type: string\n    label: Public network name or ID\n    description: Public network that enables remote connection to VNF\n  vbrgemu_bng_private_net_id:\n    type: string\n    label: vBNG private network name or ID\n    description: Private network that connects vBRGEMU to vBNG\n  vbrgemu_bng_private_subnet_id:\n    type: string\n    label: vBNG private sub-network name or ID\n    description: vBNG private sub-network name or ID\n  vbrgemu_bng_private_net_cidr:\n    type: string\n    label: vBNG IN private network CIDR\n    description: The CIDR of the input side of vBNG private network\n # vbrgemu_private_net_id:\n #   type: string\n #   label: vBRGEMU Home private network name or ID\n #   description: Private network that connects vBRGEMU to local devices\n  #vbrgemu_private_net_cidr:\n  #  type: string\n  #  label: vBRGEMU Home private network CIDR\n  #  description: The CIDR of the input side of vBRGEMU Home private network\n  vbrgemu_private_ip_0:\n    type: string\n    label: vGW private IP address\n    description: Private IP address towards the BRGEMU-BNG network\n  #vbrgemu_private_ip_1:\n  #  type: string\n  #  label: vGW private IP address\n  #  description: Private IP address towards the BRGEMU private network\n  vbrgemu_name_0:\n    type: string\n    label: vGW  name\n    description: Name of the vGW\n  vnf_id:\n    type: string\n    label: VNF ID\n    description: The VNF ID is provided by ONAP\n  vf_module_id:\n    type: string\n    label: vCPE module ID\n    description: The vCPE Module ID is provided by ONAP\n  key_name:\n    type: string\n    label: Key pair name\n    description: Public/Private key pair name\n  pub_key:\n    type: string\n    label: Public key\n    description: Public key to be installed on the compute instance\n  repo_url_blob:\n    type: string\n    label: Repository URL\n    description: URL of the repository that hosts the demo packages\n  repo_url_artifacts:\n    type: string\n    label: Repository URL\n    description: URL of the repository that hosts the demo packages\n  install_script_version:\n    type: string\n    label: Installation script version number\n    description: Version number of the scripts that install the vFW demo app\n  demo_artifacts_version:\n    type: string\n    label: Artifacts version used in demo vnfs\n    description: Artifacts (jar, tar.gz) version used in demo vnfs\n  cloud_env:\n    type: string\n    label: Cloud environment\n    description: Cloud environment (e.g., openstack, rackspace)\n  vpp_source_repo_url:\n    type: string\n    label: VPP Source Git Repo\n    description: URL for VPP source codes\n  vpp_source_repo_branch:\n    type: string\n    label: VPP Source Git Branch\n    description: Git Branch for the VPP source codes\n  hc2vpp_source_repo_url:\n    type: string\n    label: Honeycomb Source Git Repo\n    description: URL for Honeycomb source codes\n  hc2vpp_source_repo_branch:\n    type: string\n    label: Honeycomb Source Git Branch\n    description: Git Branch for the Honeycomb source codes\n  vpp_patch_url:\n    type: string\n    label: VPP Patch URL\n    description: URL for VPP patch for vBRG Emulator\n  sdnc_ip:\n    type: string\n    label: SDNC ip address\n    description: SDNC ip address used to set NAT\n  compile_state:\n    type: string\n    label: Compile State\n    description: State to compile code or not\n#############\n#           #\n# RESOURCES #\n#           #\n#############\n\nresources:\n\n  random-str:\n    type: OS::Heat::RandomString\n    properties:\n      length: 4\n\n  my_keypair:\n    type: OS::Nova::KeyPair\n    properties:\n      name:\n        str_replace:\n          template: base_rand\n          params:\n            base: { get_param: key_name }\n            rand: { get_resource: random-str }\n      public_key: { get_param: pub_key }\n      save_private_key: false\n\n  #vbrgemu_private_network:\n  #  type: OS::Neutron::Net\n  #  properties:\n  #    name: { get_param: vbrgemu_private_net_id }\n\n  #vbrgemu_private_subnet:\n  #  type: OS::Neutron::Subnet\n  #  properties:\n  #    name: { get_param: vbrgemu_private_net_id }\n  #    network_id: { get_resource: vbrgemu_private_network }\n  #    cidr: { get_param: vbrgemu_private_net_cidr }\n\n  # Virtual BRG Emulator Instantiation\n  # 0_port should get IP address from DHCP discover through vBNG once the VNF is running\n  vbrgemu_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: vbrgemu_bng_private_net_id }\n      fixed_ips: [{\"subnet\": { get_param: vbrgemu_bng_private_subnet_id }, \"ip_address\": { get_param: vbrgemu_private_ip_0 }}]\n\n  #vbrgemu_private_1_port:\n  #  type: OS::Neutron::Port\n  #  properties:\n  #    network: { get_resource: vbrgemu_private_network }\n  #    fixed_ips: [{\"subnet\": { get_resource: vbrgemu_private_subnet }, \"ip_address\": { get_param: vbrgemu_private_ip_1 }}]\n\n  vbrgemu_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vcpe_image_name }\n      flavor: { get_param: vcpe_flavor_name }\n      name: { get_param: vbrgemu_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vbrgemu_private_0_port }\n        #- port: { get_resource: vbrgemu_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n           # __brgemu_net_ipaddr__: { get_param: vbrgemu_private_ip_1 }\n           # __brgemu_cidr__: { get_param: vbrgemu_private_net_cidr }\n            __brgemu_bng_private_net_cidr__: { get_param: vbrgemu_bng_private_net_cidr }\n            __repo_url_blob__ : { get_param: repo_url_blob }\n            __repo_url_artifacts__ : { get_param: repo_url_artifacts }\n            __demo_artifacts_version__ : { get_param: demo_artifacts_version }\n            __install_script_version__ : { get_param: install_script_version }\n            __cloud_env__ : { get_param: cloud_env }\n            __vpp_source_repo_url__ : { get_param: vpp_source_repo_url }\n            __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch }\n            __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url }\n            __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch }\n            __vpp_patch_url__ : { get_param: vpp_patch_url }\n            __sdnc_ip__ : { get_param: sdnc_ip }\n            __compile_state__ : { get_param: compile_state }\n          template: |\n            #!/bin/bash\n\n            # Create configuration files\n            mkdir /opt/config\n            #echo \"__brgemu_net_ipaddr__\" > /opt/config/brgemu_net_ipaddr.txt\n            #echo \"__brgemu_cidr__\" > /opt/config/brgemu_net_cidr.txt\n            echo \"__brgemu_bng_private_net_cidr__\" > /opt/config/brgemu_bng_private_net_cidr.txt\n            echo \"__repo_url_blob__\" > /opt/config/repo_url_blob.txt\n            echo \"__repo_url_artifacts__\" > /opt/config/repo_url_artifacts.txt\n            echo \"__demo_artifacts_version__\" > /opt/config/demo_artifacts_version.txt\n            echo \"__install_script_version__\" > /opt/config/install_script_version.txt\n            echo \"__cloud_env__\" > /opt/config/cloud_env.txt\n            echo \"__vpp_source_repo_url__\" > /opt/config/vpp_source_repo_url.txt\n            echo \"__vpp_source_repo_branch__\" > /opt/config/vpp_source_repo_branch.txt\n            echo \"__hc2vpp_source_repo_url__\" > /opt/config/hc2vpp_source_repo_url.txt\n            echo \"__hc2vpp_source_repo_branch__\" > /opt/config/hc2vpp_source_repo_branch.txt\n            echo \"__vpp_patch_url__\" > /opt/config/vpp_patch_url.txt\n            echo \"__sdnc_ip__\" > /opt/config/sdnc_ip.txt\n            echo \"__compile_state__\" > /opt/config/compile_state.txt\n\n            # Download and run install script\n            curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_brgemu_install.sh -o /opt/v_brgemu_install.sh\n            cd /opt\n            chmod +x v_brgemu_install.sh\n            ./v_brgemu_install.sh\n",
    "parameters": {
        "vf_module_id": "ee67e4ca-617a-48b6-bfa4-bdddda89c741",
        "vcpe_image_name": "vbrg-base-ubuntu-16-04",
        "repo_url_blob": "https://nexus.onap.org/content/sites/raw",
        "compile_state": "done",
        "vbrgemu_bng_private_net_id": "vcpe_net_brg_bng_201807160624",
        "vpp_source_repo_url": "https://gerrit.fd.io/r/vpp",
        "public_net_id": "234f8767-7013-4256-9471-ca34294c4c5c",
        "demo_artifacts_version": "1.1.1",
        "sdnc_ip": "10.0.7.1",
        "pub_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh",
        "key_name": "vbrgemu_key",
        "repo_url_artifacts": "https://nexus.onap.org/content/groups/staging",
        "vnf_id": "aff5bdd4-4ee9-4d92-aeff-7492c13f3ffe",
        "vcpe_flavor_name": "m1.medium",
        "vbrgemu_name_0": "zdcpe1cpe01brgemu01_201807200718",
        "vpp_patch_url": "https://git.onap.org/demo/plain/vnfs/vCPE/vpp-option-82-for-vbrg/src/patches/VPP-Add-Option82-Nat-Filter-For-vBRG.patch",
        "vbrgemu_bng_private_net_cidr": "10.3.0.0/24",
        "install_script_version": "1.1.1",
        "hc2vpp_source_repo_url": "https://gerrit.fd.io/r/hc2vpp",
        "vpp_source_repo_branch": "stable/1704",
        "vbrgemu_bng_private_subnet_id": "vcpe_net_brg_bng_subnet_201807160624",
        "vbrgemu_private_ip_0": "10.3.0.37",
        "hc2vpp_source_repo_branch": "stable/1704",
        "cloud_env": "openstack"
    },
    "environment": "parameters:\n  cloud_env: \"openstack\"\n  compile_state: \"done\"\n  demo_artifacts_version: \"1.1.0\"\n  hc2vpp_source_repo_branch: \"stable/1704\"\n  hc2vpp_source_repo_url: \"https://gerrit.fd.io/r/hc2vpp\"\n  install_script_version: \"1.1.0-SNAPSHOT\"\n  key_name: \"vbrgemu_key\"\n  pub_key: \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN\"\n  public_net_id: \"971040b2-7059-49dc-b220-4fab50cb2ad4\"\n  repo_url_artifacts: \"https://nexus.onap.org/content/groups/staging\"\n  repo_url_blob: \"https://nexus.onap.org/content/sites/raw\"\n  sdnc_ip: \"10.0.7.1\"\n  vbrgemu_bng_private_net_cidr: \"10.3.0.0/24\"\n  vbrgemu_bng_private_net_id: \"zdfw1bngin01_private\"\n  vbrgemu_bng_private_subnet_id: \"zdfw1bngin01_sub_private\"\n  vbrgemu_name_0: \"zdcpe1cpe01brgemu01\"\n  vbrgemu_private_ip_0: \"10.3.0.4\"\n  vcpe_flavor_name: \"m1.medium\"\n  vcpe_image_name: \"vbrg-base-ubuntu-16-04\"\n  vf_module_id: \"vCPE_Customer_BRGEMU\"\n  vnf_id: \"vCPE_Infrastructure_BGREMU_demo_app\"\n  vpp_patch_url: \"https://git.onap.org/demo/plain/vnfs/vCPE/vpp-option-82-for-vbrg/src/patches/VPP-Add-Option82-Nat-Filter-For-vBRG.patch\"\n  vpp_source_repo_branch: \"stable/1704\"\n  vpp_source_repo_url: \"https://gerrit.fd.io/r/vpp\"\n",
    "stack_name": "vcpe_vfmodule_vcpevspvbrg20180628a_201807200718",
    "timeout_mins": 120,
    "disable_rollback": true
}