airshipctl/roles/libvirt-network/defaults/main.yaml
Yasin, Siraj (SY495P) c25d223c7b Add copyright for missing files
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
    missing files. Type:  go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
   > ./tools/add_license.sh

* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments

New Files:
  1. tools/add_license.sh
  2. tools/license_go.txt
  3. tools/license_yaml.txt
  4. tools/license_bash.txt

Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
2020-04-09 08:35:59 -05:00

166 lines
4.8 KiB
YAML

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# libvirt_network:
# name: provision-network
# spec:
# forward:
# mode: nat
# nat:
# port:
# - start: 1024
# end: 65535
# bridge:
# name: "prov-net-br"
# stp: 'on'
# delay: '0'
# ip:
# address: "172.22.0.1"
# netmask: "255.255.255.0"
# libvirt_network:
# name: "{{ bm_net_name }}"
# persistent: true
# autostart: true
# spec:
# forward:
# mode: nat
# nat:
# port:
# - start: 1024
# end: 65535
# bridge:
# name: "{{ bm_net_name }}"
# stp: 'on'
# delay: '0'
# domain:
# name: 'tests.baremetal.net'
# localOnly: 'yes'
# dns:
# - forwarder:
# domain: 'apps.tests.baremetal.net'
# addr: '127.0.0.1'
# - forwarder:
# domain: 'services.tests.baremetal.net'
# addr: '127.0.0.1'
# ip: "{{ bm_net_0_ip_cfg }}"
libvirt_network_template_default: |
<network>
<name>{{ net_yaml.name }}</name>
{% if net_yaml.forward is defined %}
{% if net_yaml.forward.mode is defined %}
<forward mode='{{ net_yaml.forward.mode }}'>
{% else %}
<forward>
{% endif %}
{% if net_yaml.forward.nat is defined %}
<nat>
{% if net_yaml.forward.nat.port is defined %}
{% for port in net_yaml.forward.nat.port %}
<port start='{{ port.start | string }}' end='{{ port.end | string }}'/>
{% endfor %}
{% endif %}
</nat>
{% endif %}
</forward>
{% endif %}
{% if net_yaml.bridge is defined %}
<bridge
{% if net_yaml.bridge.name is defined %}
name='{{ net_yaml.bridge.name }}'
{% endif %}
{% if net_yaml.bridge.stp is defined %}
stp='{{ net_yaml.bridge.stp | string }}'
{% endif %}
{% if net_yaml.bridge.delay is defined %}
delay='{{ net_yaml.bridge.delay | string }}'
{% endif %}
/>
{% endif %}
{% if net_yaml.mac is defined %}
<mac
{% if net_yaml.mac.address is defined %}
address='{{ net_yaml.mac.address }}'
{% endif %}
/>
{% endif %}
{% if net_yaml.domain is defined %}
<domain
{% if net_yaml.domain.name is defined %}
name='{{ net_yaml.domain.name }}'
{% endif %}
{% if net_yaml.domain.localOnly is defined %}
localOnly='{{ net_yaml.domain.localOnly | string }}'
{% endif %}
/>
{% endif %}
{% if net_yaml.dns is defined %}
<dns>
{% if net_yaml.dns | list %}
{% for dns_item in net_yaml.dns %}
{% if dns_item.forwarder is defined %}
<forwarder
{% if dns_item.forwarder.domain is defined %}
domain='{{ dns_item.forwarder.domain }}'
{% endif %}
{% if dns_item.forwarder.addr is defined %}
addr='{{ dns_item.forwarder.addr }}'
{% endif %}
/>
{% endif %}
{% endfor %}
{% endif %}
</dns>
{% endif %}
{% if net_yaml.ip is defined %}
<ip
{% if net_yaml.ip.address is defined %}
address='{{ net_yaml.ip.address }}'
{% endif %}
{% if net_yaml.ip.netmask is defined %}
netmask='{{ net_yaml.ip.netmask }}'
{% endif %}
>
{% if net_yaml.ip.dhcp is defined %}
<dhcp>
{% for dhcp_item in net_yaml.ip.dhcp %}
{% if dhcp_item.range is defined %}
<range
{% if dhcp_item.range.start is defined %}
start='{{ dhcp_item.range.start }}'
{% endif %}
{% if dhcp_item.range.end is defined %}
end='{{ dhcp_item.range.end }}'
{% endif %}
/>
{% endif %}
{% if dhcp_item.host is defined %}
<host
{% if dhcp_item.host.mac is defined %}
mac='{{ dhcp_item.host.mac }}'
{% endif %}
{% if dhcp_item.host.name is defined %}
name='{{ dhcp_item.host.name }}'
{% endif %}
{% if dhcp_item.host.ip is defined %}
ip='{{ dhcp_item.host.ip }}'
{% endif %}
/>
{% endif %}
{% endfor %}
</dhcp>
{% endif %}
</ip>
{% endif %}
</network>