Skip to content

Commit

Permalink
aws-vpc-move-ip: Fixing the indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
sbotman committed Aug 27, 2020
1 parent f7f553c commit 3c51c6e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions heartbeat/aws-vpc-move-ip
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,17 @@ ec2ip_validate() {
}

ec2ip_monitor() {
MON_RES=""
if ocf_is_true ${OCF_RESKEY_eni_id_lookup}; then
EC2_ATTRIBUTE_LOOKUP="NetworkInterfaceId"
EC2_ID="$(ec2ip_get_instance_eni)"
identification="interface"
else
EC2_ATTRIBUTE_LOOKUP="InstanceId"
EC2_ID="$EC2_INSTANCE_ID"
identification="instance"
fi
MON_RES=""
if ocf_is_true ${OCF_RESKEY_eni_id_lookup}; then
EC2_ATTRIBUTE_LOOKUP="NetworkInterfaceId"
EC2_ID="$(ec2ip_get_instance_eni)"
identification="interface"
else
EC2_ATTRIBUTE_LOOKUP="InstanceId"
EC2_ID="$EC2_INSTANCE_ID"
identification="instance"
fi

if ocf_is_true ${OCF_RESKEY_monapi} || [ "$__OCF_ACTION" = "start" ] || ocf_is_probe; then
for rtb in $(echo $OCF_RESKEY_routing_table | sed -e 's/,/ /g'); do
ocf_log info "monitor: check routing table (API call) - $rtb"
Expand Down Expand Up @@ -324,7 +325,7 @@ ec2ip_get_instance_eni() {
}

ec2ip_get_and_configure() {
EC2_NETWORK_INTERFACE_ID="$(ec2ip_get_instance_eni)"
EC2_NETWORK_INTERFACE_ID="$(ec2ip_get_instance_eni)"
for rtb in $(echo $OCF_RESKEY_routing_table | sed -e 's/,/ /g'); do
if [ -z "${OCF_RESKEY_routing_table_role}" ]; then
cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile $region_opt --output text ec2 replace-route --route-table-id $rtb --destination-cidr-block ${OCF_RESKEY_ip}/32 --network-interface-id $EC2_NETWORK_INTERFACE_ID"
Expand Down

0 comments on commit 3c51c6e

Please sign in to comment.