From 43b66ea9b5cd2f2bfcca818d7febbeb09c3b5140 Mon Sep 17 00:00:00 2001 From: Ivar Lazzaro Date: Wed, 11 Apr 2018 13:30:49 -0700 Subject: [PATCH] Make sure cli_patch is valid even when networking-sfc is not installed Change-Id: Ibfdf12915781f39ff5ad03bee7e927aeff617829 --- gbpservice/neutron/services/sfc/aim/cli_patch.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gbpservice/neutron/services/sfc/aim/cli_patch.py b/gbpservice/neutron/services/sfc/aim/cli_patch.py index 5e232b793..fb7209287 100644 --- a/gbpservice/neutron/services/sfc/aim/cli_patch.py +++ b/gbpservice/neutron/services/sfc/aim/cli_patch.py @@ -10,17 +10,18 @@ # License for the specific language governing permissions and limitations # under the License. +API_NAME = 'sfc_patch' +API_VERSION_OPTION = '' + + +def build_option_parser(parser): + """Hook to add global options""" + return parser + try: from networking_sfc.cli import port_pair_group from networking_sfc.osc.sfc import port_pair_group as osc_ppg - API_NAME = 'sfc_patch' - API_VERSION_OPTION = '' - - def build_option_parser(parser): - """Hook to add global options""" - return parser - # Removing field limitation def add_known_arguments(self, parser): parser.add_argument(