# Path: networking_sfc/cli/flow_classifier.py
# FLOW_CLASSIFIER_RESOURCE = 'flow_classifier'
# def get_flowclassifier_id(client, id_or_name):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def _fill_protocol_port_info(self, body, port_type, port_val):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def extend_list(self, data, parsed_args):
#     def _get_protocol_port_details(self, data, type):
# class FlowClassifier(extension.NeutronClientExtension):
# class FlowClassifierCreate(extension.ClientExtensionCreate,
#                            FlowClassifier):
# class FlowClassifierUpdate(extension.ClientExtensionUpdate,
#                            FlowClassifier):
# class FlowClassifierDelete(extension.ClientExtensionDelete,
#                            FlowClassifier):
# class FlowClassifierList(extension.ClientExtensionList,
#                          FlowClassifier):
# class FlowClassifierShow(extension.ClientExtensionShow, FlowClassifier):


import sys
from unittest import mock
from neutronclient import shell
from neutronclient.tests.unit import test_cli20
from networking_sfc.cli import flow_classifier as fc
from oslo_utils import uuidutils
#    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.
#





source_port_UUID = uuidutils.generate_uuid()
destination_port_UUID = uuidutils.generate_uuid()


class CLITestV20FCExtensionJSON(test_cli20.CLITestV20Base):
    def setUp(self):
        super(CLITestV20FCExtensionJSON, self).setUp()
        self._mock_extension_loading()
        self.register_non_admin_status_resource('flow_classifier')

    def _create_patch(self, name, func=None):
        patcher = mock.patch(name)
        thing = patcher.start()
        self.addCleanup(patcher.stop)
        return thing

    def _mock_extension_loading(self):
        ext_pkg = 'neutronclient.common.extension'
        flow_classifier = self._create_patch(ext_pkg +
                                             '._discover_via_entry_points')

# Path: networking_sfc/cli/flow_classifier.py
# FLOW_CLASSIFIER_RESOURCE = 'flow_classifier'
# def get_flowclassifier_id(client, id_or_name):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def _fill_protocol_port_info(self, body, port_type, port_val):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def extend_list(self, data, parsed_args):
#     def _get_protocol_port_details(self, data, type):
# class FlowClassifier(extension.NeutronClientExtension):
# class FlowClassifierCreate(extension.ClientExtensionCreate,
#                            FlowClassifier):
# class FlowClassifierUpdate(extension.ClientExtensionUpdate,
#                            FlowClassifier):
# class FlowClassifierDelete(extension.ClientExtensionDelete,
#                            FlowClassifier):
# class FlowClassifierList(extension.ClientExtensionList,
#                          FlowClassifier):
# class FlowClassifierShow(extension.ClientExtensionShow, FlowClassifier):


# Path: networking_sfc/tests/unit/cli/test_flow_classifier.py
import sys
from unittest import mock
from neutronclient import shell
from neutronclient.tests.unit import test_cli20
from networking_sfc.cli import flow_classifier as fc
from oslo_utils import uuidutils

#    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.
#





source_port_UUID = uuidutils.generate_uuid()
destination_port_UUID = uuidutils.generate_uuid()


class CLITestV20FCExtensionJSON(test_cli20.CLITestV20Base):
    def setUp(self):
        super(CLITestV20FCExtensionJSON, self).setUp()
        self._mock_extension_loading()
        self.register_non_admin_status_resource('flow_classifier')

    def _create_patch(self, name, func=None):
        patcher = mock.patch(name)
        thing = patcher.start()
        self.addCleanup(patcher.stop)
        return thing

    def _mock_extension_loading(self):
        ext_pkg = 'neutronclient.common.extension'
        flow_classifier = self._create_patch(ext_pkg +
                                             '._discover_via_entry_points')

        flow_classifier.return_value = [("flow_classifier", fc)]