Пример #1
0
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("transit_gateway_peering", "test_transit_gw_peering")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")

try:
    log.info("Verifying destroy functionality...")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing S2C configuration...")
    tf.import_test("site2cloud", "test_s2c")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
Пример #3
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    tf.import_test("aws_tgw_vpn_conn", "test_aws_tgw_vpn_conn1")
    tf.import_test("aws_tgw_vpn_conn", "test_aws_tgw_vpn_conn2")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")


log.info(str(os.path.split(os.getcwd())[1]).upper() + " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    log.debug("     Importing text-idp-metadata SAML endpoint...")
    tf.import_test("saml_endpoint", "text_saml_endpoint")
    log.debug("     Importing custom-idp-metadata SAML endpoint...")
    tf.import_test("saml_endpoint", "custom_saml_endpoint")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")


log.info(str(os.path.split(os.getcwd())[1]).upper() + " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")

Пример #5
0
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("fqdn", "fqdn_tag_1")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     switchDomains: Updating the FQDN Domain filter name...")
    tf.update_test("switchDomains")
    log.debug(
        "     switchPorts: Updating port #s of the various Egress rules...")
    tf.update_test("switchPorts")
    log.debug(
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing the AWS (LDAP, Duo) gateway...")
    tf.import_test("gateway", "aws_ldap_duo_gw")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     duoUpdateIntKey: Updating the Duo Integration Key...")
    tf.update_test("duoUpdateIntKey")
    log.debug("     duoUpdateSecretKey: Updating the Duo Secret Key...")
    tf.update_test("duoUpdateSecretKey")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing the OCI gateway...")
    tf.import_test("gateway", "oci_vpn_gateway")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug(
        "     updateVPNCIDR: Updating the VPN CIDR for uses of accidental overlap with home network..."
    )
    tf.update_test("updateVPNCIDR")
    log.debug(
        "     updateSearchDomain: Updating list of domain names that will use the NameServers when specific name not in destination..."
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("azure_peer", "azure_test_peer")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
Пример #9
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("vpn_user_accelerator", "test_vpn_user_accel")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
Пример #10
0
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("aws_tgw", "test_aws_tgw")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug(
        "     switchConnectDomain: Switching around which domains to be connected within the TGW..."
    )
    tf.update_test("switchConnectDomain")
    log.debug(
        "     switchVPC: Updating which VPCs to be attached to the TGW...")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test(resource, name, varfile)
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    tf.update_test(varfile)
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("transit_gateway", "oci_transit_gateway")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     enableSingleAZHA: Enabling single AZHA feature...")
    tf.update_test("enableSingleAZHA")
    log.debug(
        "     switchConnectedTransit: Disabling spokes from running traffic to other spokes via transit gateway..."
    )
    tf.update_test("switchConnectedTransit")
Пример #13
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify("awsgov_acc_cred")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("account", "aws_gov_root_1", "awsgov_acc_cred")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    tf.import_test("gateway", "azure_gw")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")


try:
    log.info("Verifying update functionality...")
    log.debug("     disableVPNNAT: Disables VPN connection from using NAT when traffic leaves the gateway...")
    tf.update_test("disableVPNNAT")
except tf.subprocess.CalledProcessError as err:
Пример #15
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("create_verify", False)
    sys.exit(1)
else:
    return_result("create_verify", True)


try:
    log.info("Verifying import functionality...")
    log.debug("     Importing TGW...")
    tf.import_test("aws_tgw", "test_aws_tgw")
    log.debug("     Importing TGW Transit Gateway Attachment...")
    tf.import_test("aws_tgw_transit_gateway_attachment", "tgw_transit_att")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("import_test", False)
    sys.exit(1)
else:
    return_result("import_test", True)


try:
    log.info("Verifying update functionality...")
    log.debug("     switchConnectDomain: Switching around which domains to be connected within the TGW...")
    tf.update_test("switchConnectDomain")
    log.debug("     switchVPC: Updating which VPCs to be attached to the TGW...")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("aws_tgw_directconnect", "aws_tgw_dc")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug(
        "     updatePrefix: Update list of CIDRs for DxGW to advertise to remote (on-prem)..."
    )
    tf.update_test("updatePrefix")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    tf.import_test("spoke_gateway", "aws_spoke_gateway")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")


try:
    log.info("Verifying update functionality...")
    log.debug("Sleeping for 2 minutes to wait for infrastructure to be up...")
    time.sleep(120)
    log.debug("     updateTransitGW: Updating to switch transit gateway to attach to the spoke...")
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("tunnel", "peeringTunnel")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")

try:
    log.info("Verifying destroy functionality...")
Пример #19
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing firewall tag and policies...")
    tf.import_test("firewall_tag", "fw_tag_test")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("      updateCIDR: Updating one of the tag rule's CIDR...")
    tf.update_test("updateCIDR")
    log.debug("     updateCIDRTagName: Updating the tag rule's name...")
    tf.update_test("updateCIDRTagName")
Пример #20
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    log.debug("     Importing S2C unmapped configuration...")
    tf.import_test("site2cloud", "s2c_test2")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")


log.debug("Sleeping for 2 minutes to wait for infrastructure to be up...")
time.sleep(120)


try:
    log.info("Verifying destroy functionality for Unmapped...")
    tf.destroy_target("site2cloud", "s2c_test")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing the GCP gateway...")
    tf.import_test("gateway", "gcloud_gw")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     updateHAGWSize: Enabling and creating HA gateway...")
    tf.update_test("updateHAGWSize")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     update_test(): FAIL\n")
    sys.exit()
Пример #22
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("transit_gateway", "azure_transit_gw")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     enableSingleAZHA: Enabling single AZHA feature...")
    tf.update_test("enableSingleAZHA")
    log.debug(
        "     switchConnectedTransit: Disabling spokes from running traffic to other spokes via transit gateway..."
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("arm_peer", "test_armpeer")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

log.info(
    str(os.path.split(os.getcwd())[1]).upper() +
    " does not support update functionality...")
log.info("-------------------- RESULT --------------------")
log.info("     update_test(): SKIPPED\n")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")


try:
    log.info("Verifying import functionality...")
    tf.import_test("transit_gateway", "gcp_transit_gateway")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")


try:
    log.info("Verifying update functionality...")
    log.debug("     enableSingleAZHA: Enabling single AZHA feature...")
    tf.update_test("enableSingleAZHA")
    log.debug("     disableSNAT: Disable single IP SNAT...")
Пример #25
0
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing the AWS (LDAP, Duo) gateway...")
    tf.import_test("gateway", "aws_ldap_duo_gw")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     duoUpdateIntKey: Updating the Duo Integration Key...")
    tf.update_test("duoUpdateIntKey")
    log.debug("     duoUpdateSecretKey: Updating the Duo Secret Key...")
    tf.update_test("duoUpdateSecretKey")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("spoke_gateway", "arm_spoke_gw")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     disableSingleAZHA: Disabling single AZHA feature...")
    tf.update_test("disableSingleAZHA")
    log.debug("     enableHA: Enabling HA gateway...")
    tf.update_test("enableHA")
log.info("-------------------- RESULT --------------------")
log.info("      Set environment credentials: PASS\n")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    tf.import_test("spoke_gateway", "test_spoke_gateway_arm")
except:
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit()
log.info("-------------------- RESULT --------------------")
log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")
    log.debug("     disableSingleAZHA: Disabling single AZHA feature...")
    tf.update_test("disableSingleAZHA")
    log.debug("     enableHA: Enabling HA gateway...")
    tf.update_test("enableHA")
    log.debug("     updateGWSize: Updating spoke gateway's size...")
    tf.update_test("updateGWSize")

try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("create_verify", False)
    sys.exit(1)
else:
    return_result("create_verify", True)


try:
    log.info("Verifying import functionality...")
    tf.import_test("gateway", "aws_gw_test_1")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("import_test", False)
    sys.exit(1)
else:
    return_result("import_test", True)


try:
    log.info("Verifying update functionality...")
    log.debug("     disableSNAT: Disabling single IP SNAT...")
    tf.update_test("disableSNAT")
    log.debug("     updateTagList: Updating gateway's tags...")
    tf.update_test("updateTagList")
    log.debug("     updateGWSize: Updating gateway's size...")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("create_verify", False)
    sys.exit(1)
else:
    return_result("create_verify", True)


try:
    log.info("Verifying import functionality...")
    log.debug("     Importing Geo VPN...")
    tf.import_test("geo_vpn", "test_geo_vpn")
    log.debug("     Importing Geo VPN user...")
    tf.import_test("vpn_user", "geo_vpn_user")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    return_result("import_test", False)
    sys.exit(1)
else:
    return_result("import_test", True)


log.info(str(os.path.split(os.getcwd())[1]).upper() + " does not support update functionality...")
log.info("Testing support of update functionality of ELB/ GeoVPN settings - Mantis (13570)... ")
for i in range(3):
    try:
        log.debug("     updateVPN: Updating the ELB/ GeoVPN settings by updating all ELB's VPN settings simultaneously...")
try:
    log.info("Creating infrastructure...")
    tf.create_verify()
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     create_verify(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      create_verify(): PASS\n")

try:
    log.info("Verifying import functionality...")
    log.debug("     Importing stateful firewall and policies...")
    tf.import_test("firewall", "test_firewall")
    log.debug("     Importing stateful firewall (ICMP) and policies...")
    tf.import_test("firewall", "test_firewall_icmp")
    log.debug("     Importing stateful firewall used for stress testing...")
    tf.import_test("firewall", "stress_firewall")
except tf.subprocess.CalledProcessError as err:
    log.exception(err.stderr.decode())
    log.info("-------------------- RESULT --------------------")
    log.error("     import_test(): FAIL\n")
    sys.exit(1)
else:
    log.info("-------------------- RESULT --------------------")
    log.info("      import_test(): PASS\n")

try:
    log.info("Verifying update functionality...")