diff --git a/samples/tosca-templates/vnfd/tosca-config-openwrt-vrouter.yaml b/samples/tosca-templates/vnfd/tosca-config-openwrt-vrouter.yaml new file mode 100644 index 000000000..0c410615a --- /dev/null +++ b/samples/tosca-templates/vnfd/tosca-config-openwrt-vrouter.yaml @@ -0,0 +1,46 @@ +vdus: + VDU1: + config: + network: | + package network + + config interface 'loopback' + option ifname 'lo' + option proto 'static' + option ipaddr '127.0.0.1' + option netmask '255.0.0.0' + + config interface 'mgmt_net' + option ifname 'eth0' + option proto 'dhcp' + + config interface 'net1' + option ifname 'eth1' + option proto 'dhcp' + + config interface 'net2' + option ifname 'eth2' + option proto 'dhcp' + + firewall: | + package firewall + + config defaults + option syn_flood '1' + option input 'ACCEPT' + option output 'ACCEPT' + option forward 'ACCEPT' + + config zone + option name 'mgmt_net' + option network 'mgmt_net' + option input 'ACCEPT' + option output 'ACCEPT' + option forward 'REJECT' + + config zone + option name 'lan' + list network 'net1 net2' + option input 'ACCEPT' + option output 'ACCEPT' + option forward 'ACCEPT' diff --git a/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py b/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py index 8589f74b6..c217f9b33 100644 --- a/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py +++ b/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py @@ -91,7 +91,7 @@ class DeviceMgmtOpenWRT(abstract_driver.DeviceMGMTAbstractDriver): for vdu, vdu_dict in vdus_config_dict.items(): config = vdu_dict.get('config', {}) for key, conf_value in config.items(): - KNOWN_SERVICES = ('firewall', ) + KNOWN_SERVICES = ('firewall', 'network') if key not in KNOWN_SERVICES: continue mgmt_ip_address = mgmt_url.get(vdu, '')