# Path: networking_sfc/_i18n.py
# DOMAIN = "networking_sfc"
# _C = _translators.contextual_form
# _P = _translators.plural_form
# def get_available_languages():
# 
# 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):


from neutronclient.common import extension
from neutronclient.common import utils
from neutronclient.neutron import v2_0 as neutronv20
from networking_sfc._i18n import _
from networking_sfc.cli import port_pair as pp
def get_port_pair_group_id(client, id_or_name):
    return neutronv20.find_resourceid_by_name_or_id(client,
                                                    PORT_PAIR_GROUP_RESOURCE,
                                                    id_or_name)


class PortPairGroup(extension.NeutronClientExtension):
    resource = PORT_PAIR_GROUP_RESOURCE
    resource_plural = '%ss' % resource
    object_path = '/sfc/%s' % resource_plural
    resource_path = '/sfc/%s/%%s' % resource_plural
    versions = ['2.0']


def add_common_arguments(parser):
    parser.add_argument(
        '--description',
        help=_('Description for the Port Pair Group.'))
    parser.add_argument(
        '--port-pair',
        metavar='PORT-PAIR',
        dest='port_pairs',
        default=[],
        action='append',
        help=_('ID or name of the Port Pair. '
               'This option can be repeated.'))


def update_common_args2body(client, body, parsed_args):
    if parsed_args.port_pairs:

# Path: networking_sfc/_i18n.py
# DOMAIN = "networking_sfc"
# _C = _translators.contextual_form
# _P = _translators.plural_form
# def get_available_languages():
# 
# 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/cli/port_pair_group.py
from neutronclient.common import extension
from neutronclient.common import utils
from neutronclient.neutron import v2_0 as neutronv20
from networking_sfc._i18n import _
from networking_sfc.cli import port_pair as pp

def get_port_pair_group_id(client, id_or_name):
    return neutronv20.find_resourceid_by_name_or_id(client,
                                                    PORT_PAIR_GROUP_RESOURCE,
                                                    id_or_name)


class PortPairGroup(extension.NeutronClientExtension):
    resource = PORT_PAIR_GROUP_RESOURCE
    resource_plural = '%ss' % resource
    object_path = '/sfc/%s' % resource_plural
    resource_path = '/sfc/%s/%%s' % resource_plural
    versions = ['2.0']


def add_common_arguments(parser):
    parser.add_argument(
        '--description',
        help=_('Description for the Port Pair Group.'))
    parser.add_argument(
        '--port-pair',
        metavar='PORT-PAIR',
        dest='port_pairs',
        default=[],
        action='append',
        help=_('ID or name of the Port Pair. '
               'This option can be repeated.'))


def update_common_args2body(client, body, parsed_args):
    if parsed_args.port_pairs:

        body['port_pairs'] = [(pp.get_port_pair_id(client, pp1))