Skip to content

Commit

Permalink
Merge pull request #624 from perfectsense/feature/add-tags-for-egress…
Browse files Browse the repository at this point in the history
…-only-ig

Add tags for egress-only internet gateway resource
  • Loading branch information
deepanjan90 authored Feb 22, 2024
2 parents d1938c8 + eca5da1 commit 1ef8ab2
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* end
*/
@Type("egress-only-internet-gateway")
public class EgressOnlyInternetGatewayResource extends AwsResource implements Copyable<EgressOnlyInternetGateway> {
public class EgressOnlyInternetGatewayResource extends Ec2TaggableResource<EgressOnlyInternetGateway> implements Copyable<EgressOnlyInternetGateway> {

private VpcResource vpc;

Expand Down Expand Up @@ -80,6 +80,11 @@ public void setId(String id) {
this.id = id;
}

@Override
protected String getResourceId() {
return getId();
}

@Override
public void copyFrom(EgressOnlyInternetGateway egressOnlyInternetGateway) {
setId(egressOnlyInternetGateway.egressOnlyInternetGatewayId());
Expand All @@ -90,7 +95,7 @@ public void copyFrom(EgressOnlyInternetGateway egressOnlyInternetGateway) {
}

@Override
public boolean refresh() {
public boolean doRefresh() {
Ec2Client client = createClient(Ec2Client.class);

EgressOnlyInternetGateway egressOnlyInternetGateway = getEgressOnlyInternetGateway(client);
Expand All @@ -105,7 +110,7 @@ public boolean refresh() {
}

@Override
public void create(GyroUI ui, State state) {
public void doCreate(GyroUI ui, State state) {
Ec2Client client = createClient(Ec2Client.class);

if (getVpc() != null) {
Expand All @@ -116,7 +121,7 @@ public void create(GyroUI ui, State state) {
}

@Override
public void update(GyroUI ui, State state, Resource current, Set<String> changedFieldNames) {
public void doUpdate(GyroUI ui, State state, AwsResource config, Set<String> changedProperties) {

}

Expand Down

0 comments on commit 1ef8ab2

Please sign in to comment.