Ejemplo n.º 1
0
    def __init__(self, cli_ctx=None):
        from azure.cli.core.commands import CliCommandType
        from ._client_factory import keyvault_client_factory
        from ._command_type import KeyVaultCommandGroup, KeyVaultArgumentContext
        from azure.cli.core import ModExtensionSuppress
        keyvault_custom = CliCommandType(
            operations_tmpl='azure.cli.command_modules.keyvault.custom#{}',
            client_factory=keyvault_client_factory
        )

        super(KeyVaultCommandsLoader, self).__init__(
            cli_ctx=cli_ctx,
            resource_type=ResourceType.MGMT_KEYVAULT,
            custom_command_type=keyvault_custom,
            command_group_cls=KeyVaultCommandGroup,
            argument_context_cls=KeyVaultArgumentContext,
            # Suppress myextension up to and including version 0.1.3
            suppress_extension=ModExtensionSuppress(__name__, 'keyvault-preview',
                                                    '0.1.3',
                                                    reason='These commands are now in the CLI.',
                                                    recommend_remove=True))