{
  "template": {
    "heat_template_version": "2015-04-30",
    "resources": {
      "firewall1": {
        "type": "OS::Nova::Server",
        "properties": {
          "flavor": {
            "flavorName": "m1.small",
            "vcpu": 2,
            "ram": 2048,
            "storage": 20
          },
          "image": "ubuntu:trusty",
          "name": "firewall1",
          "networks": [
            {
              "port": {
                "get_resource": "firewall1:cp01:mgmt"
              }
            },
            {
              "port": {
                "get_resource": "firewall1:cp02:input"
              }
            },
            {
              "port": {
                "get_resource": "firewall1:cp03:output"
              }
            }
          ]
        }
      },
      "firewall1:cp01:mgmt": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "firewall1:cp01:mgmt",
          "network": {
            "get_resource": "sonata-demo:mgmt:net"
          }
        }
      },
      "firewall1:cp02:input": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "firewall1:cp02:input",
          "network": {
            "get_resource": "firewall:input:net"
          }
        }
      },
      "firewall1:cp03:output": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "firewall1:cp03:output",
          "network": {
            "get_resource": "firewall:output:net"
          }
        }
      },
      "firewall1:firewall-2-tcpdump:1": {
        "type": "OS::Neutron::RouterInterface",
        "properties": {
          "router": {
            "get_resource": "sonata-demo:firewall-2-tcpdump"
          },
          "subnet": {
            "get_resource": "firewall:output:subnet"
          }
        }
      },
      "firewall1:iperf-2-firewall:1": {
        "type": "OS::Neutron::RouterInterface",
        "properties": {
          "router": {
            "get_resource": "sonata-demo:iperf-2-firewall"
          },
          "subnet": {
            "get_resource": "firewall:input:subnet"
          }
        }
      },
      "firewall:input:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "firewall:input:net"
        }
      },
      "firewall:input:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "firewall:input:subnet",
          "network": {
            "get_resource": "firewall:input:net"
          }
        }
      },
      "firewall:output:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "firewall:output:net"
        }
      },
      "firewall:output:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "firewall:output:subnet",
          "network": {
            "get_resource": "firewall:output:net"
          }
        }
      },
      "floating:firewall1:cp01:mgmt": {
        "type": "OS::Neutron::FloatingIP",
        "properties": {
          "floating_network_id": "decd89e2-1681-427e-ac24-6e9f1abb1715",
          "port_id": {
            "get_resource": "firewall1:cp01:mgmt"
          }
        }
      },
      "floating:iperf1:cp01:mgmt": {
        "type": "OS::Neutron::FloatingIP",
        "properties": {
          "floating_network_id": "decd89e2-1681-427e-ac24-6e9f1abb1715",
          "port_id": {
            "get_resource": "iperf1:cp01:mgmt"
          }
        }
      },
      "floating:tcpdump1:cp01:mgmt": {
        "type": "OS::Neutron::FloatingIP",
        "properties": {
          "floating_network_id": "decd89e2-1681-427e-ac24-6e9f1abb1715",
          "port_id": {
            "get_resource": "tcpdump1:cp01:mgmt"
          }
        }
      },
      "iperf1": {
        "type": "OS::Nova::Server",
        "properties": {
          "flavor": {
            "flavorName": "m1.small",
            "vcpu": 2,
            "ram": 2048,
            "storage": 20
          },
          "image": "ubuntu:trusty",
          "name": "iperf1",
          "networks": [
            {
              "port": {
                "get_resource": "iperf1:cp01:mgmt"
              }
            },
            {
              "port": {
                "get_resource": "iperf1:cp02:input"
              }
            },
            {
              "port": {
                "get_resource": "iperf1:cp03:output"
              }
            }
          ]
        }
      },
      "iperf1:cp01:mgmt": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "iperf1:cp01:mgmt",
          "network": {
            "get_resource": "sonata-demo:mgmt:net"
          }
        }
      },
      "iperf1:cp02:input": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "iperf1:cp02:input",
          "network": {
            "get_resource": "iperf:input:net"
          }
        }
      },
      "iperf1:cp03:output": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "iperf1:cp03:output",
          "network": {
            "get_resource": "iperf:output:net"
          }
        }
      },
      "iperf1:input-2-iperf:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "iperf1:input-2-iperf:net"
        }
      },
      "iperf1:input-2-iperf:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.2.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "iperf1:input-2-iperf:subnet",
          "network": {
            "get_resource": "iperf1:input-2-iperf:net"
          }
        }
      },
      "iperf1:iperf-2-firewall:1": {
        "type": "OS::Neutron::RouterInterface",
        "properties": {
          "router": {
            "get_resource": "sonata-demo:iperf-2-firewall"
          },
          "subnet": {
            "get_resource": "iperf:output:subnet"
          }
        }
      },
      "iperf:input:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "iperf:input:net"
        }
      },
      "iperf:input:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "iperf:input:subnet",
          "network": {
            "get_resource": "iperf:input:net"
          }
        }
      },
      "iperf:output:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "iperf:output:net"
        }
      },
      "iperf:output:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "iperf:output:subnet",
          "network": {
            "get_resource": "iperf:output:net"
          }
        }
      },
      "sonata-demo:firewall-2-tcpdump": {
        "type": "OS::Neutron::Router",
        "properties": {
          "name": "sonata-demo:firewall-2-tcpdump"
        }
      },
      "sonata-demo:iperf-2-firewall": {
        "type": "OS::Neutron::Router",
        "properties": {
          "name": "sonata-demo:iperf-2-firewall"
        }
      },
      "sonata-demo:mgmt:internal": {
        "type": "OS::Neutron::RouterInterface",
        "properties": {
          "router": "20790da5-2dc1-4c7e-b9c3-a8d590517563",
          "subnet": {
            "get_resource": "sonata-demo:mgmt:subnet"
          }
        }
      },
      "sonata-demo:mgmt:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "sonata-demo:mgmt:net"
        }
      },
      "sonata-demo:mgmt:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.2.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "sonata-demo:mgmt:subnet",
          "network": {
            "get_resource": "sonata-demo:mgmt:net"
          }
        }
      },
      "tcpdump1": {
        "type": "OS::Nova::Server",
        "properties": {
          "flavor": {
            "flavorName": "m1.small",
            "vcpu": 2,
            "ram": 2048,
            "storage": 20
          },
          "image": "ubuntu:trusty",
          "name": "tcpdump1",
          "networks": [
            {
              "port": {
                "get_resource": "tcpdump1:cp01:mgmt"
              }
            },
            {
              "port": {
                "get_resource": "tcpdump1:cp02:input"
              }
            },
            {
              "port": {
                "get_resource": "tcpdump1:cp03:output"
              }
            }
          ]
        }
      },
      "tcpdump1:cp01:mgmt": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "tcpdump1:cp01:mgmt",
          "network": {
            "get_resource": "sonata-demo:mgmt:net"
          }
        }
      },
      "tcpdump1:cp02:input": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "tcpdump1:cp02:input",
          "network": {
            "get_resource": "tcpdump:input:net"
          }
        }
      },
      "tcpdump1:cp03:output": {
        "type": "OS::Neutron::Port",
        "properties": {
          "name": "tcpdump1:cp03:output",
          "network": {
            "get_resource": "tcpdump:output:net"
          }
        }
      },
      "tcpdump1:firewall-2-tcpdump:1": {
        "type": "OS::Neutron::RouterInterface",
        "properties": {
          "router": {
            "get_resource": "sonata-demo:firewall-2-tcpdump"
          },
          "subnet": {
            "get_resource": "tcpdump:input:subnet"
          }
        }
      },
      "tcpdump1:tcpdump-2-output:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "tcpdump1:tcpdump-2-output:net"
        }
      },
      "tcpdump1:tcpdump-2-output:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.2.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "tcpdump1:tcpdump-2-output:subnet",
          "network": {
            "get_resource": "tcpdump1:tcpdump-2-output:net"
          }
        }
      },
      "tcpdump:input:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "tcpdump:input:net"
        }
      },
      "tcpdump:input:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "tcpdump:input:subnet",
          "network": {
            "get_resource": "tcpdump:input:net"
          }
        }
      },
      "tcpdump:output:net": {
        "type": "OS::Neutron::Net",
        "properties": {
          "name": "tcpdump:output:net"
        }
      },
      "tcpdump:output:subnet": {
        "type": "OS::Neutron::Subnet",
        "properties": {
          "cidr": "192.0.1.0/29",
          "gateway_ip": "192.1.0.1",
          "name": "tcpdump:output:subnet",
          "network": {
            "get_resource": "tcpdump:output:net"
          }
        }
      }
    }
  },
  "stack_name": "s1"

}