# Copyright VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
importargparse
importre
importsys
fromnetaddrimportIPNetwork,AddrFormatError
parser=argparse.ArgumentParser(description='strip off private information from VyOS config')
strictness=parser.add_mutually_exclusive_group()
strictness.add_argument('--loose',action='store_true',help='remove only information specified as arguments')
strictness.add_argument('--strict',action='store_true',help='remove any private information (implies all arguments below). This is the default behavior.')
parser.add_argument('--mac',action='store_true',help='strip off MAC addresses')
parser.add_argument('--hostname',action='store_true',help='strip off system host and domain names')
parser.add_argument('--username',action='store_true',help='strip off user names')
parser.add_argument('--dhcp',action='store_true',help='strip off DHCP shared network and static mapping names')
parser.add_argument('--domain',action='store_true',help='strip off domain names')
parser.add_argument('--asn',action='store_true',help='strip off BGP ASNs')
parser.add_argument('--snmp',action='store_true',help='strip off SNMP location information')
parser.add_argument('--lldp',action='store_true',help='strip off LLDP location information')