Brad Bishop | 732c6db | 2015-10-19 14:49:21 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
Brad Bishop | b338560 | 2016-03-04 15:32:01 -0500 | [diff] [blame] | 3 | # Contributors Listed Below - COPYRIGHT 2016 |
Brad Bishop | 732c6db | 2015-10-19 14:49:21 -0400 | [diff] [blame] | 4 | # [+] International Business Machines Corp. |
| 5 | # |
| 6 | # |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 16 | # implied. See the License for the specific language governing |
| 17 | # permissions and limitations under the License. |
| 18 | |
Brad Bishop | 63f59a7 | 2016-07-25 12:05:57 -0400 | [diff] [blame] | 19 | import sys |
| 20 | import obmc.mapper.server |
Brad Bishop | cb2e1b3 | 2017-07-09 20:11:35 -0400 | [diff] [blame] | 21 | from argparse import ArgumentParser |
Brad Bishop | 732c6db | 2015-10-19 14:49:21 -0400 | [diff] [blame] | 22 | |
Brad Bishop | 732c6db | 2015-10-19 14:49:21 -0400 | [diff] [blame] | 23 | if __name__ == '__main__': |
Brad Bishop | cb2e1b3 | 2017-07-09 20:11:35 -0400 | [diff] [blame] | 24 | parser = ArgumentParser() |
| 25 | parser.add_argument( |
| 26 | '-p', '--path_namespaces', |
| 27 | required=True) |
| 28 | parser.add_argument( |
| 29 | '-i', '--interface_namespaces', |
| 30 | required=True) |
| 31 | parser.add_argument( |
| 32 | '-b', '--blacklists', |
| 33 | default="") |
| 34 | parser.add_argument( |
| 35 | '-n', '--interface_blacklists', |
| 36 | default="") |
| 37 | |
| 38 | args = parser.parse_args() |
| 39 | |
| 40 | sys.exit( |
| 41 | obmc.mapper.server.server_main( |
| 42 | path_namespaces=args.path_namespaces.split(), |
| 43 | interface_namespaces=args.interface_namespaces.split(), |
| 44 | blacklists=args.blacklists.split(), |
| 45 | interface_blacklists=args.interface_blacklists.split())) |