Пример #1
0
    def print_results(self, stack_name: str,
                      boto3_session: boto3.session.Session) -> None:
        output = aws.get_output(stack_name, boto3_session)

        bastion_ip = aws.get_ec2_info(
            output["BastionId"],
            boto3_session)[constants.cloudformation.PUBLIC_IP_ADDRESS]
        master_ip = aws.get_ec2_info(
            output["MasterId"],
            boto3_session)[constants.cloudformation.PRIVATE_IP_ADDRESS]
        region = output[constants.cloudformation.REGION]
        log_group = output[constants.cloudformation.LOG_GROUP]

        self.print_output_info(master_ip=master_ip,
                               bastion_ip=bastion_ip,
                               region=region,
                               log_group=log_group)
Пример #2
0
    def print_results(self) -> None:
        stack_name = self.parameters[constants.cloudformation.CLUSTER_ID]
        boto3_session = self.parameters[constants.cloudformation.BOTO3_SESSION]

        output = aws.get_output(stack_name, boto3_session)

        bastion_ip = aws.get_ec2_info(output["BastionId"], boto3_session)[
            constants.cloudformation.PUBLIC_IP_ADDRESS
        ]
        master_ip = aws.get_ec2_info(output["MasterId"], boto3_session)[
            constants.cloudformation.PRIVATE_IP_ADDRESS
        ]
        region = output[constants.cloudformation.REGION]
        log_group = output[constants.cloudformation.LOG_GROUP]

        self.print_output_info(
            master_ip=master_ip, bastion_ip=bastion_ip, region=region, log_group=log_group
        )