How to use the paconn._LOGIN function in paconn

To help you get started, we’ve selected a few paconn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / commands.py View on Github external
def load_command_table(self, args):
    """
    Loads the command table
    """
    def operation_group(name):
        return '{cli_name}.commands.{name}#{name}'.format(cli_name=__CLI_NAME__, name=name)

    with CommandGroup(self, _COMMAND_GROUP, operation_group(_LOGIN)) as command_group:
        command_group.command(_LOGIN, _LOGIN)

    with CommandGroup(self, _COMMAND_GROUP, operation_group(_DOWNLOAD)) as command_group:
        command_group.command(_DOWNLOAD, _DOWNLOAD)

    with CommandGroup(self, _COMMAND_GROUP, operation_group(_CREATE)) as command_group:
        command_group.command(_CREATE, _CREATE)

    with CommandGroup(self, _COMMAND_GROUP, operation_group(_UPDATE)) as command_group:
        command_group.command(_UPDATE, _UPDATE)

    with CommandGroup(self, _COMMAND_GROUP, operation_group(_VALIDATE)) as command_group:
        command_group.command(_VALIDATE, _VALIDATE)
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / params.py View on Github external
def load_arguments(self, command):
    """
    Load command line arguments
    """
    with ArgumentsContext(self, _LOGIN) as arg_context:
        arg_context.argument(
            'client_id',
            options_list=['--clid', '-i'],
            type=str,
            required=False,
            help='The client ID.')
        arg_context.argument(
            'tenant',
            options_list=['--tenant', '-t'],
            type=str,
            required=False,
            help='The tenant.')
        arg_context.argument(
            'authority_url',
            options_list=['--authority_url', '-a'],
            type=str,
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / help.py View on Github external
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------

"""
Help strings for the CLI
"""

from knack.help_files import helps  # pylint: disable=unused-import
from paconn import _COMMAND_GROUP, _LOGIN, _DOWNLOAD, _CREATE, _UPDATE, _VALIDATE

helps[_COMMAND_GROUP] = """
    short-summary: Microsoft Power Platform Connectors CLI
"""

helps[_LOGIN] = """
    type: command
    short-summary: Login to Power Platform.
    examples:
        - name: Login
          text: paconn login
"""


helps[_DOWNLOAD] = """
    type: command
    short-summary: Downloads a given custom connector to the local directory.
    examples:
        - name: Download connector
          text: paconn download
"""