# Path: networking_sfc/cli/port_pair.py
# PORT_RESOURCE = 'port'
# PORT_PAIR_RESOURCE = 'port_pair'
# def get_port_id(client, id_or_name):
# def get_port_pair_id(client, id_or_name):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
# class PortPair(extension.NeutronClientExtension):
# class PortPairCreate(extension.ClientExtensionCreate, PortPair):
# class PortPairUpdate(extension.ClientExtensionUpdate, PortPair):
# class PortPairDelete(extension.ClientExtensionDelete, PortPair):
# class PortPairList(extension.ClientExtensionList, PortPair):
# class PortPairShow(extension.ClientExtensionShow, PortPair):


import sys
from unittest import mock
from neutronclient import shell
from neutronclient.tests.unit import test_cli20
from networking_sfc.cli import port_pair as pp
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.
#





ingress_port_UUID = uuidutils.generate_uuid()
egress_port_UUID = uuidutils.generate_uuid()


class CLITestV20PortPairExtensionJSON(test_cli20.CLITestV20Base):
    def setUp(self):
        super(CLITestV20PortPairExtensionJSON, self).setUp()
        self._mock_extension_loading()
        self.register_non_admin_status_resource('port_pair')

    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'
        port_pair = self._create_patch(ext_pkg +
                                       '._discover_via_entry_points')

# Path: networking_sfc/cli/port_pair.py
# PORT_RESOURCE = 'port'
# PORT_PAIR_RESOURCE = 'port_pair'
# def get_port_id(client, id_or_name):
# def get_port_pair_id(client, id_or_name):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
#     def add_known_arguments(self, parser):
#     def args2body(self, parsed_args):
# class PortPair(extension.NeutronClientExtension):
# class PortPairCreate(extension.ClientExtensionCreate, PortPair):
# class PortPairUpdate(extension.ClientExtensionUpdate, PortPair):
# class PortPairDelete(extension.ClientExtensionDelete, PortPair):
# class PortPairList(extension.ClientExtensionList, PortPair):
# class PortPairShow(extension.ClientExtensionShow, PortPair):


# Path: networking_sfc/tests/unit/cli/test_port_pair.py
import sys
from unittest import mock
from neutronclient import shell
from neutronclient.tests.unit import test_cli20
from networking_sfc.cli import port_pair as pp
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.
#





ingress_port_UUID = uuidutils.generate_uuid()
egress_port_UUID = uuidutils.generate_uuid()


class CLITestV20PortPairExtensionJSON(test_cli20.CLITestV20Base):
    def setUp(self):
        super(CLITestV20PortPairExtensionJSON, self).setUp()
        self._mock_extension_loading()
        self.register_non_admin_status_resource('port_pair')

    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'
        port_pair = self._create_patch(ext_pkg +
                                       '._discover_via_entry_points')

        port_pair.return_value = [("port_pair", pp)]