# Path: neutron_taas/_i18n.py
# DOMAIN = 'neutron_taas'
# _C = _translators.contextual_form
# _P = _translators.plural_form
# def get_available_languages():


from neutron_taas._i18n import _
from neutronclient.common import extension
from neutronclient.common import utils
from neutronclient.neutron import v2_0 as neutronv20

class CreateTapFlow(extension.ClientExtensionCreate, TapFlow):
    """Create a tap flow."""

    shell_command = 'tap-flow-create'
    list_columns = ['id', 'name', 'direction', 'source_port']

    def add_known_arguments(self, parser):
        _add_updatable_args(parser)
        parser.add_argument(
            '--port',
            required=True,
            metavar="SOURCE_PORT",
            help=_('Source port to which the Tap Flow is connected.'))
        parser.add_argument(
            '--tap-service',
            required=True,
            metavar="TAP_SERVICE",
            help=_('Tap Service to which the Tap Flow belongs.'))
        parser.add_argument(
            '--direction',
            required=True,
            metavar="DIRECTION",
            choices=['IN', 'OUT', 'BOTH'],
            type=utils.convert_to_uppercase,
            help=_('Direction of the Tap flow.'))
        parser.add_argument(
            '--vlan-filter',
            required=False,
            metavar="VLAN_FILTER",

# Path: neutron_taas/_i18n.py
# DOMAIN = 'neutron_taas'
# _C = _translators.contextual_form
# _P = _translators.plural_form
# def get_available_languages():


# Path: neutron_taas/taas_client/tapflow.py
from neutron_taas._i18n import _
from neutronclient.common import extension
from neutronclient.common import utils
from neutronclient.neutron import v2_0 as neutronv20


class CreateTapFlow(extension.ClientExtensionCreate, TapFlow):
    """Create a tap flow."""

    shell_command = 'tap-flow-create'
    list_columns = ['id', 'name', 'direction', 'source_port']

    def add_known_arguments(self, parser):
        _add_updatable_args(parser)
        parser.add_argument(
            '--port',
            required=True,
            metavar="SOURCE_PORT",
            help=_('Source port to which the Tap Flow is connected.'))
        parser.add_argument(
            '--tap-service',
            required=True,
            metavar="TAP_SERVICE",
            help=_('Tap Service to which the Tap Flow belongs.'))
        parser.add_argument(
            '--direction',
            required=True,
            metavar="DIRECTION",
            choices=['IN', 'OUT', 'BOTH'],
            type=utils.convert_to_uppercase,
            help=_('Direction of the Tap flow.'))
        parser.add_argument(
            '--vlan-filter',
            required=False,
            metavar="VLAN_FILTER",

            help=_('VLAN Ids to be mirrored in the form of range string.'))