fuel-plugin-nitrous/deployment_scripts/puppet/modules/nitrous/templates/vlan.erb

41 lines
1.3 KiB
Plaintext

#!/bin/sh
#
# Copyright (c) 2016 AT&T Inc.
#
# 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.
brctl delif <%= @mgmt_brg %> <%= @mgmt_nm %>
if [ $? == 0 ]; then
echo "Deleted <%= @mgmt_nm %>" > /var/log/nitrous-vlan.log
vconfig rem <%= @mgmt_nm %>
if [ $? == 0 ]; then
echo "Removed <%= @mgmt_nm %>" >> /var/log/nitrous-vlan.log
fi
fi
brctl delif <%= @stg_brg %> <%= @stg_nm %>
if [ $? == 0 ]; then
echo "Deleted <%= @stg_nm %>" >> /var/log/nitrous-vlan.log
vconfig rem <%= @stg_nm %>
if [ $? == 0 ]; then
echo "Removed <%= @stg_nm %>" >> /var/log/nitrous-vlan.log
fi
fi
brctl delif <%= @prv_brg %> <%= @prv_nm %>
if [ $? == 0 ]; then
echo "Deleted <%= @prv_nm %>" >> /var/log/nitrous-vlan.log
vconfig rem <%= @prv_nm %>
if [ $? == 0 ]; then
echo "Removed <%= @prv_nm %>" >> /var/log/nitrous-vlan.log
fi
fi