How to use the paconn._CREATE 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
SETTINGS,
            options_list=SETTINGS_OPTIONS,
            type=str,
            required=False,
            help=SETTINGS_HELP)
        arg_context.argument(
            'overwrite',
            options_list=['--overwrite', '-w'],
            type=bool,
            required=False,
            nargs='?',
            default=False,
            const=True,
            help='Overwrite all the existing connector and settings files.')

    with ArgumentsContext(self, _CREATE) as arg_context:
        arg_context.argument(
            ENVIRONMENT,
            options_list=ENVIRONMENT_OPTIONS,
            type=str,
            required=False,
            help=ENVIRONMENT_HELP)
        arg_context.argument(
            API_PROPERTIES,
            options_list=API_PROPERTIES_OPTIONS,
            type=str,
            required=False,
            help=API_PROPERTIES_HELP)
        arg_context.argument(
            API_DEFINITION,
            options_list=API_DEFINITION_OPTIONS,
            type=str,
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / create.py View on Github external
Create command.
    """
    # Get settings
    settings = SettingsBuilder.get_settings(
        environment=environment,
        settings_file=settings_file,
        api_properties=api_properties,
        api_definition=api_definition,
        icon=icon,
        connector_id=None,
        powerapps_url=powerapps_url,
        powerapps_version=powerapps_version)

    powerapps_rp, _ = load_powerapps_and_flow_rp(
        settings=settings,
        command_context=_CREATE)

    connector_id = upsert(
        powerapps_rp=powerapps_rp,
        settings=settings,
        client_secret=client_secret,
        is_update=False,
        overwrite_settings=overwrite_settings)

    display('{} created successfully.'.format(connector_id))
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 / help.py View on Github external
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
"""

helps[_CREATE] = """
    type: command
    short-summary: Creates a new custom connector from the given directory.
    examples:
        - name: Create connector
          text: paconn create
"""

helps[_UPDATE] = """
    type: command
    short-summary: Update a given custom connector from the local directory.
    examples:
        - name: Update connector.
          text: paconn update
"""

helps[_VALIDATE] = """