blob: 43034347e2d3258a0eea21a05c6d64689b15710a [file] [log] [blame]
Brad Bishop732c6db2015-10-19 14:49:21 -04001#!/usr/bin/env python
2
Brad Bishopb3385602016-03-04 15:32:01 -05003# Contributors Listed Below - COPYRIGHT 2016
Brad Bishop732c6db2015-10-19 14:49:21 -04004# [+] 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 Bishop63f59a72016-07-25 12:05:57 -040019import sys
20import obmc.mapper.server
Brad Bishopcb2e1b32017-07-09 20:11:35 -040021from argparse import ArgumentParser
Brad Bishop732c6db2015-10-19 14:49:21 -040022
Brad Bishop732c6db2015-10-19 14:49:21 -040023if __name__ == '__main__':
Brad Bishopcb2e1b32017-07-09 20:11:35 -040024 parser = ArgumentParser()
25 parser.add_argument(
26 '-p', '--path_namespaces',
Brad Bishop365dee32018-10-19 20:58:53 -040027 default="")
Brad Bishopcb2e1b32017-07-09 20:11:35 -040028 parser.add_argument(
Brad Bishopcfe3e442018-10-22 21:02:42 -040029 '-s', '--service_namespaces',
Brad Bishop365dee32018-10-19 20:58:53 -040030 required=True)
Brad Bishopcfe3e442018-10-22 21:02:42 -040031 parser.add_argument(
Brad Bishopcb2e1b32017-07-09 20:11:35 -040032 '-i', '--interface_namespaces',
33 required=True)
34 parser.add_argument(
35 '-b', '--blacklists',
36 default="")
37 parser.add_argument(
Brad Bishopcfe3e442018-10-22 21:02:42 -040038 '-x', '--service_blacklists',
39 default="")
40 parser.add_argument(
Brad Bishopcb2e1b32017-07-09 20:11:35 -040041 '-n', '--interface_blacklists',
42 default="")
43
44 args = parser.parse_args()
45
46 sys.exit(
47 obmc.mapper.server.server_main(
48 path_namespaces=args.path_namespaces.split(),
Brad Bishopcfe3e442018-10-22 21:02:42 -040049 service_namespaces=args.service_namespaces.split(),
Brad Bishopcb2e1b32017-07-09 20:11:35 -040050 interface_namespaces=args.interface_namespaces.split(),
51 blacklists=args.blacklists.split(),
Brad Bishopcfe3e442018-10-22 21:02:42 -040052 service_blacklists=args.service_blacklists.split(),
Brad Bishopcb2e1b32017-07-09 20:11:35 -040053 interface_blacklists=args.interface_blacklists.split()))