Пример #1
0
 def register(self, subparsers, parsed_config):
     diag_parser = subparsers.add_parser(
         'diag',
         description=(
             'Create instance to diagnose an existing encrypted instance.'),
         formatter_class=brkt_cli.SortingHelpFormatter)
     diag_args.setup_diag_args(diag_parser)
Пример #2
0
    def register(self, subparsers, parsed_config):
        self.config = parsed_config

        aws_parser = subparsers.add_parser(
            self.name(),
            description='AWS operations',
            help='AWS operations'
        )

        aws_subparsers = aws_parser.add_subparsers(
            dest='aws_subcommand'
        )

        diag_parser = aws_subparsers.add_parser(
            'diag',
            description=(
                'Create instance to diagnose an existing encrypted instance.'
            ),
            help='Diagnose an encrypted instance',
            formatter_class=brkt_cli.SortingHelpFormatter
        )
        diag_args.setup_diag_args(diag_parser)
        diag_parser.set_defaults(aws_subcommand='diag')

        encrypt_ami_parser = aws_subparsers.add_parser(
            'encrypt',
            description='Create an encrypted AMI from an existing AMI.',
            help='Encrypt an AWS image',
            formatter_class=brkt_cli.SortingHelpFormatter
        )
        encrypt_ami_args.setup_encrypt_ami_args(encrypt_ami_parser)
        setup_instance_config_args(encrypt_ami_parser, parsed_config,
                                   mode=INSTANCE_CREATOR_MODE)
        encrypt_ami_parser.set_defaults(aws_subcommand='encrypt')

        share_logs_parser = aws_subparsers.add_parser(
            'share-logs',
            description='Share logs from an existing encrypted instance.',
            help='Share logs',
            formatter_class=brkt_cli.SortingHelpFormatter
        )
        share_logs_args.setup_share_logs_args(share_logs_parser)
        share_logs_parser.set_defaults(aws_subcommand='share-logs')

        update_encrypted_ami_parser = aws_subparsers.add_parser(
            'update',
            description=(
                'Update an encrypted AMI with the latest Metavisor '
                'release.'
            ),
            help='Update an encrypted AWS image',
            formatter_class=brkt_cli.SortingHelpFormatter
        )
        update_encrypted_ami_args.setup_update_encrypted_ami(
            update_encrypted_ami_parser)
        setup_instance_config_args(update_encrypted_ami_parser,
                                   parsed_config,
                                   mode=INSTANCE_UPDATER_MODE)
        update_encrypted_ami_parser.set_defaults(aws_subcommand='update')
Пример #3
0
 def register(self, subparsers, parsed_config):
     diag_parser = subparsers.add_parser(
         'diag',
         description=(
             'Create instance to diagnose an existing encrypted instance.'
         ),
         formatter_class=brkt_cli.SortingHelpFormatter
     )
     diag_args.setup_diag_args(diag_parser)