From 366f5de0e7a3baade6e598f7c36290ccf1f0755c Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Tue, 27 Feb 2024 15:06:09 +0300 Subject: [PATCH] #1877 use public IP --- src/main/java/com/rultor/agents/aws/AwsEc2Instance.java | 8 ++++---- src/main/java/com/rultor/agents/aws/StartsInstance.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/rultor/agents/aws/AwsEc2Instance.java b/src/main/java/com/rultor/agents/aws/AwsEc2Instance.java index 2980b68ac1..1936e9c313 100644 --- a/src/main/java/com/rultor/agents/aws/AwsEc2Instance.java +++ b/src/main/java/com/rultor/agents/aws/AwsEc2Instance.java @@ -152,11 +152,11 @@ public String id() { } /** - * Instance Ip. - * @return Instance Ipv6 address + * Instance IP. + * @return Instance IP address * @checkstyle MethodNameCheck (3 lines) */ - public String ipv6() { - return this.instance.getIpv6Address(); + public String address() { + return this.instance.getPublicIpAddress(); } } diff --git a/src/main/java/com/rultor/agents/aws/StartsInstance.java b/src/main/java/com/rultor/agents/aws/StartsInstance.java index fd88321b8b..7754935b33 100644 --- a/src/main/java/com/rultor/agents/aws/StartsInstance.java +++ b/src/main/java/com/rultor/agents/aws/StartsInstance.java @@ -131,14 +131,14 @@ public Iterable process(final XML xml) throws IOException { } Logger.info( this, "EC2 instance %s on %s started in %s", - inst.id(), inst.ipv6(), + inst.id(), inst.address(), xml.xpath("/talk/@name").get(0) ); dirs.xpath("/talk").add("ec2") .attr("id", inst.id()); dirs.xpath("/talk").add("shell") .attr("id", hash) - .add("host").set(inst.ipv6()).up() + .add("host").set(inst.address()).up() .add("port").set(Integer.toString(this.shell.port())).up() .add("login").set(login).up() .add("key").set(key);